diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 587d3b2eba7f..4a697c73faec 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -142,7 +142,6 @@ struct audit_buffer { | |||
142 | int total; | 142 | int total; |
143 | int type; | 143 | int type; |
144 | int pid; | 144 | int pid; |
145 | int count; /* Times requeued */ | ||
146 | }; | 145 | }; |
147 | 146 | ||
148 | void audit_set_type(struct audit_buffer *ab, int type) | 147 | void audit_set_type(struct audit_buffer *ab, int type) |
@@ -526,9 +525,9 @@ static inline int audit_log_drain(struct audit_buffer *ab) | |||
526 | retval = netlink_unicast(audit_sock, skb, audit_pid, | 525 | retval = netlink_unicast(audit_sock, skb, audit_pid, |
527 | MSG_DONTWAIT); | 526 | MSG_DONTWAIT); |
528 | } | 527 | } |
529 | if (retval == -EAGAIN && ab->count < 5) { | 528 | if (retval == -EAGAIN && |
530 | ++ab->count; | 529 | (atomic_read(&audit_backlog)) < audit_backlog_limit) { |
531 | skb_queue_tail(&ab->sklist, skb); | 530 | skb_queue_head(&ab->sklist, skb); |
532 | audit_log_end_irq(ab); | 531 | audit_log_end_irq(ab); |
533 | return 1; | 532 | return 1; |
534 | } | 533 | } |
@@ -666,7 +665,6 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx) | |||
666 | ab->total = 0; | 665 | ab->total = 0; |
667 | ab->type = AUDIT_KERNEL; | 666 | ab->type = AUDIT_KERNEL; |
668 | ab->pid = 0; | 667 | ab->pid = 0; |
669 | ab->count = 0; | ||
670 | 668 | ||
671 | #ifdef CONFIG_AUDITSYSCALL | 669 | #ifdef CONFIG_AUDITSYSCALL |
672 | if (ab->ctx) | 670 | if (ab->ctx) |