projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0608f43
)
audit: fix endless wait in audit_log_start()
author
Konstantin Khlebnikov
<
[email protected]
>
Tue, 24 Sep 2013 22:27:42 +0000
(15:27 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 25 Sep 2013 00:00:26 +0000
(17:00 -0700)
After commit
829199197a43
("kernel/audit.c: avoid negative sleep
durations") audit emitters will block forever if userspace daemon cannot
handle backlog.
After the timeout the waiting loop turns into busy loop and runs until
daemon dies or returns back to work. This is a minimal patch for that
bug.
Signed-off-by: Konstantin Khlebnikov <
[email protected]
>
Cc: Luiz Capitulino <
[email protected]
>
Cc: Richard Guy Briggs <
[email protected]
>
Cc: Eric Paris <
[email protected]
>
Cc: Chuck Anderson <
[email protected]
>
Cc: Dan Duval <
[email protected]
>
Cc: Dave Kleikamp <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/audit.c
patch
|
blob
|
history
diff --git
a/kernel/audit.c
b/kernel/audit.c
index 91e53d04b6a9e8841e697dcb290f1206468da21a..7b0e23a740ce345987c33f9e012302c24de0f4db 100644
(file)
--- a/
kernel/audit.c
+++ b/
kernel/audit.c
@@
-1117,9
+1117,10
@@
struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
sleep_time = timeout_start + audit_backlog_wait_time -
jiffies;
- if ((long)sleep_time > 0)
+ if ((long)sleep_time > 0)
{
wait_for_auditd(sleep_time);
- continue;
+ continue;
+ }
}
if (audit_rate_check() && printk_ratelimit())
printk(KERN_WARNING