audit: don't reset working wait time accidentally with auditd
authorRichard Guy Briggs <rgb@redhat.com>
Mon, 23 Feb 2015 20:38:00 +0000 (15:38 -0500)
committerPaul Moore <pmoore@redhat.com>
Mon, 23 Feb 2015 20:38:00 +0000 (15:38 -0500)
During a queue overflow condition while we are waiting for auditd to drain the
queue to make room for regular messages, we don't want a successful auditd that
has bypassed the queue check to reset the backlog wait time.

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

index 2125cc40e921b9a3db824339d18e4f3372db2c1c..59d4ceb3b2a66d09e4cba00a85ca62d428feaf34 100644 (file)
@@ -1395,7 +1395,8 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
                return NULL;
        }
 
-       audit_backlog_wait_time = audit_backlog_wait_time_master;
+       if (!reserve)
+               audit_backlog_wait_time = audit_backlog_wait_time_master;
 
        ab = audit_buffer_alloc(ctx, gfp_mask, type);
        if (!ab) {