[PATCH] audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE

From: Oleg Nesterov
Date: Fri May 24 2013 - 13:43:31 EST


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.

Reported-by: Guy Streeter <streeter@xxxxxxxxxx>
Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- x/kernel/audit.c
+++ x/kernel/audit.c
@@ -1056,7 +1056,7 @@ static inline void audit_get_stamp(struc
static void wait_for_auditd(unsigned long sleep_time)
{
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 &&

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/