audit: include auditd's threads in audit_log_start() wait exception
authorRichard Guy Briggs <rgb@redhat.com>
Wed, 13 Jan 2016 14:15:19 +0000 (09:15 -0500)
committerPaul Moore <paul@paul-moore.com>
Wed, 13 Jan 2016 14:15:19 +0000 (09:15 -0500)
Should auditd spawn threads, allow all members of its thread group to
use the audit_backlog_limit reserves to bypass the queue limits too.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
[PM: minor upstream merge tweaks]
Signed-off-by: Paul Moore <pmoore@redhat.com>
kernel/audit.c

index 07d60e4b2af81a028fdfdb9bfc068aabdbfa3777..60c9c5adc5be1c633951b47e6b80c297f7ea036b 100644 (file)
@@ -1371,7 +1371,7 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
                return NULL;
 
        if (gfp_mask & __GFP_DIRECT_RECLAIM) {
-               if (audit_pid && audit_pid == current->pid)
+               if (audit_pid && audit_pid == current->tgid)
                        gfp_mask &= ~__GFP_DIRECT_RECLAIM;
                else
                        reserve = 0;