diff options
-rw-r--r-- | kernel/audit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 0d4865a50171..72bc1d0d1d0d 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -101,7 +101,8 @@ static __u32 audit_nlk_portid; | |||
101 | * audit records being dropped. */ | 101 | * audit records being dropped. */ |
102 | static int audit_rate_limit; | 102 | static int audit_rate_limit; |
103 | 103 | ||
104 | /* Number of outstanding audit_buffers allowed. */ | 104 | /* Number of outstanding audit_buffers allowed. |
105 | * When set to zero, this means unlimited. */ | ||
105 | static int audit_backlog_limit = 64; | 106 | static int audit_backlog_limit = 64; |
106 | #define AUDIT_BACKLOG_WAIT_TIME (60 * HZ) | 107 | #define AUDIT_BACKLOG_WAIT_TIME (60 * HZ) |
107 | static int audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME; | 108 | static int audit_backlog_wait_time = AUDIT_BACKLOG_WAIT_TIME; |
@@ -375,7 +376,8 @@ static int audit_set_failure(int state) | |||
375 | static void audit_hold_skb(struct sk_buff *skb) | 376 | static void audit_hold_skb(struct sk_buff *skb) |
376 | { | 377 | { |
377 | if (audit_default && | 378 | if (audit_default && |
378 | skb_queue_len(&audit_skb_hold_queue) < audit_backlog_limit) | 379 | (!audit_backlog_limit || |
380 | skb_queue_len(&audit_skb_hold_queue) < audit_backlog_limit)) | ||
379 | skb_queue_tail(&audit_skb_hold_queue, skb); | 381 | skb_queue_tail(&audit_skb_hold_queue, skb); |
380 | else | 382 | else |
381 | kfree_skb(skb); | 383 | kfree_skb(skb); |