audit: audit_log_start running on auditd should not stop
authorToshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Thu, 5 Dec 2013 07:15:23 +0000 (16:15 +0900)
committerEric Paris <eparis@redhat.com>
Tue, 14 Jan 2014 03:32:22 +0000 (22:32 -0500)
commit6dd80aba90639d1765396aa5e5f55e34dc3356e5
tree5198fe1e1c3fe0bd4a1235414a93e108ce451c74
parent1b7b533f65db9b31f76972b2899ec7ec6433ae77
audit: audit_log_start running on auditd should not stop

The backlog cannot be consumed when audit_log_start is running on auditd
even if audit_log_start calls wait_for_auditd to consume it.
The situation is the deadlock because only auditd can consume the backlog.
If the other process needs to send the backlog, it can be also stopped
by the deadlock.

So, audit_log_start running on auditd should not stop.

You can see the deadlock with the following reproducer:
 # auditctl -a exit,always -S all
 # reboot

Signed-off-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Reviewed-by: gaofeng@cn.fujitsu.com
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
kernel/audit.c