diff options
author | Richard Guy Briggs <rgb@redhat.com> | 2013-09-12 23:03:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-13 16:47:59 -0500 |
commit | 34210beebddf8a2bd655086b61dbe3b72e7bc7c5 (patch) | |
tree | 73667779d34e58cf9c15ffa269185c9496047dc9 /kernel | |
parent | d840f9899a6bc8bd88b3c87cd067ddf39a6ada45 (diff) |
audit: reset audit backlog wait time after error recovery
commit e789e561a50de0aaa8c695662d97aaa5eac9d55f upstream.
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
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 7ddfd8a00a2a..6def25f1b351 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. */ |
105 | static int audit_backlog_limit = 64; | 105 | static int audit_backlog_limit = 64; |
106 | static int audit_backlog_wait_time = 60 * HZ; | 106 | #define AUDIT_BACKLOG_WAIT_TIME (60 * HZ) |
107 | static int audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME; | ||
107 | static int audit_backlog_wait_overflow = 0; | 108 | static 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. */ |
@@ -1135,6 +1136,8 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, | |||
1135 | return NULL; | 1136 | return NULL; |
1136 | } | 1137 | } |
1137 | 1138 | ||
1139 | audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME; | ||
1140 | |||
1138 | ab = audit_buffer_alloc(ctx, gfp_mask, type); | 1141 | ab = audit_buffer_alloc(ctx, gfp_mask, type); |
1139 | if (!ab) { | 1142 | if (!ab) { |
1140 | audit_log_lost("out of memory in audit_log_start"); | 1143 | audit_log_lost("out of memory in audit_log_start"); |