Patchwork [3.5.y.z,extended,stable] Patch "audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE" has been added to staging queue

mail settings
Submitter Luis Henriques
Date June 17, 2013, 2:46 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/251872/
State New
Headers show


Luis Henriques - June 17, 2013, 2:46 p.m.
This is a note to let you know that I have just added a patch titled

    audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 10dc873a348efb942fe03cc4b4559d7b6c3c8ac3 Mon Sep 17 00:00:00 2001
From: Oleg Nesterov <>
Date: Wed, 12 Jun 2013 14:04:46 -0700
Subject: [PATCH] audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE

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

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 <>
Reported-by: Guy Streeter <>
Cc: Eric Paris <>
Cc: Al Viro <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
[ luis: backported to 3.5: adjust context ]
Signed-off-by: Luis Henriques <>
 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 &&