[PATCH 90/93] audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE
Luis Henriques
luis.henriques at canonical.com
Tue Jun 18 11:43:38 UTC 2013
3.5.7.15 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <oleg at redhat.com>
commit f000cfdde5de4fc15dead5ccf524359c07eadf2b upstream.
audit_log_start() does wait_for_auditd() in a loop until
audit_backlog_wait_time passes or audit_skb_queue has a room.
If signal_pending() is true this becomes a busy-wait loop, schedule() in
TASK_INTERRUPTIBLE won't block.
Thanks to Guy for fully investigating and explaining the problem.
(akpm: that'll cause the system to lock up on a non-preemptible
uniprocessor kernel)
(Guy: "Our customer was in fact running a uniprocessor machine, and they
reported a system hang.")
Signed-off-by: Oleg Nesterov <oleg at redhat.com>
Reported-by: Guy Streeter <streeter at redhat.com>
Cc: Eric Paris <eparis at redhat.com>
Cc: Al Viro <viro at zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
[ luis: backported to 3.5: adjust context ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
kernel/audit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 1c7f2c6..5917dfe 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1167,7 +1167,7 @@ struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask,
/* Wait for auditd to drain the queue a little */
DECLARE_WAITQUEUE(wait, current);
- set_current_state(TASK_INTERRUPTIBLE);
+ set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&audit_backlog_wait, &wait);
if (audit_backlog_limit &&
--
1.8.1.2
More information about the kernel-team
mailing list