diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-19 09:55:56 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-05-19 09:55:56 -0400 |
commit | fb19b4c6aa024837a0071f07baa07dbf49d07151 (patch) | |
tree | 6062647cc9e84f81d679a5f3d27ceb8363e9822d | |
parent | 7063e6c717f6108c4b3fc3135a516c86ef944870 (diff) |
AUDIT: Honour audit_backlog_limit again.
The limit on the number of outstanding audit messages was inadvertently
removed with the switch to queuing skbs directly for sending by a kernel
thread. Put it back again.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r-- | kernel/audit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index bbc6f542c8f7..41581413529c 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -613,6 +613,18 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, int type) | |||
613 | if (!audit_initialized) | 613 | if (!audit_initialized) |
614 | return NULL; | 614 | return NULL; |
615 | 615 | ||
616 | if (audit_backlog_limit | ||
617 | && skb_queue_len(&audit_skb_queue) > audit_backlog_limit) { | ||
618 | if (audit_rate_check()) | ||
619 | printk(KERN_WARNING | ||
620 | "audit: audit_backlog=%d > " | ||
621 | "audit_backlog_limit=%d\n", | ||
622 | skb_queue_len(&audit_skb_queue), | ||
623 | audit_backlog_limit); | ||
624 | audit_log_lost("backlog limit exceeded"); | ||
625 | return NULL; | ||
626 | } | ||
627 | |||
616 | ab = audit_buffer_alloc(ctx, GFP_ATOMIC, type); | 628 | ab = audit_buffer_alloc(ctx, GFP_ATOMIC, type); |
617 | if (!ab) { | 629 | if (!ab) { |
618 | audit_log_lost("out of memory in audit_log_start"); | 630 | audit_log_lost("out of memory in audit_log_start"); |