aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2013-09-12 23:03:51 -0400
committerEric Paris <eparis@redhat.com>2014-01-13 22:27:30 -0500
commite789e561a50de0aaa8c695662d97aaa5eac9d55f (patch)
tree06e9ef8481ccb37b785c3ec478927d3dc243bb91
parent33faba7fa7f2288d2f8aaea95958b2c97bf9ebfb (diff)
audit: reset audit backlog wait time after error recovery
When the audit queue overflows and times out (audit_backlog_wait_time), the audit queue overflow timeout is set to zero. Once the audit queue overflow timeout condition recovers, the timeout should be reset to the original value. See also: https://lkml.org/lkml/2013/9/2/473 Cc: stable@vger.kernel.org # v3.8-rc4+ Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Dan Duval <dan.duval@oracle.com> Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com> Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r--kernel/audit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index dd18747dde2b..6cd2ecca705b 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -103,7 +103,8 @@ static int audit_rate_limit;
103 103
104/* Number of outstanding audit_buffers allowed. */ 104/* Number of outstanding audit_buffers allowed. */
105static int audit_backlog_limit = 64; 105static int audit_backlog_limit = 64;
106static int audit_backlog_wait_time = 60 * HZ; 106#define AUDIT_BACKLOG_WAIT_TIME (60 * HZ)
107static int audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME;
107static int audit_backlog_wait_overflow = 0; 108static int audit_backlog_wait_overflow = 0;
108 109
109/* The identity of the user shutting down the audit system. */ 110/* The identity of the user shutting down the audit system. */
@@ -1282,6 +1283,8 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
1282 return NULL; 1283 return NULL;
1283 } 1284 }
1284 1285
1286 audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME;
1287
1285 ab = audit_buffer_alloc(ctx, gfp_mask, type); 1288 ab = audit_buffer_alloc(ctx, gfp_mask, type);
1286 if (!ab) { 1289 if (!ab) {
1287 audit_log_lost("out of memory in audit_log_start"); 1290 audit_log_lost("out of memory in audit_log_start");