]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fix deadlocks in AUDIT_LIST/AUDIT_LIST_RULES
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 22 May 2006 05:09:24 +0000 (01:09 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 20 Jun 2006 09:25:20 +0000 (05:25 -0400)
commit3a6daa572aba8e84705cf3b352f342677dd324f8
treee0fa2beb83c3ef4e52cc6c6b28ce3173656f4276
parent994a7d06e229077d64fa82bc62821d792113974e
[PATCH] fix deadlocks in AUDIT_LIST/AUDIT_LIST_RULES

We should not send a pile of replies while holding audit_netlink_mutex
since we hold the same mutex when we receive commands.  As the result,
we can get blocked while sending and sit there holding the mutex while
auditctl is unable to send the next command and get around to receiving
what we'd sent.

Solution: create skb and put them into a queue instead of sending;
once we are done, send what we've got on the list.  The former can
be done synchronously while we are handling AUDIT_LIST or AUDIT_LIST_RULES;
we are holding audit_netlink_mutex at that point.  The latter is done
asynchronously and without messing with audit_netlink_mutex.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/audit.c
kernel/audit.h
kernel/auditfilter.c