audit: wake up threads if queue switched from limited to unlimited
authorRichard Guy Briggs <rgb@redhat.com>
Wed, 13 Jan 2016 14:18:54 +0000 (09:18 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 13 Jan 2016 14:18:54 +0000 (09:18 -0500)
If the audit_backlog_limit is changed from a limited value to an
unlimited value (zero) while the queue was overflowed, wake up the
audit_backlog_wait queue to allow those processes to continue.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
kernel/audit.c

index 60c9c5adc5be1c633951b47e6b80c297f7ea036b..d7b675781934e40f42608806bc503c07b6211e82 100644 (file)
@@ -523,7 +523,8 @@ static int kauditd_thread(void *dummy)
                skb = skb_dequeue(&audit_skb_queue);
 
                if (skb) {
-                       if (skb_queue_len(&audit_skb_queue) <= audit_backlog_limit)
+                       if (!audit_backlog_limit ||
+                           (skb_queue_len(&audit_skb_queue) <= audit_backlog_limit))
                                wake_up(&audit_backlog_wait);
                        if (audit_pid)
                                kauditd_send_skb(skb);