public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE
@ 2013-05-24 17:39 Oleg Nesterov
  2013-05-24 17:41 ` Oleg Nesterov
  2013-05-29 21:59 ` Andrew Morton
  0 siblings, 2 replies; 5+ messages in thread
From: Oleg Nesterov @ 2013-05-24 17:39 UTC (permalink / raw)
  To: Al Viro, Andrew Morton
  Cc: Guy Streeter, Eric Paris, David Woodhouse, linux-kernel

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@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>

--- 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 &&


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-31 17:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-24 17:39 [PATCH] audit: wait_for_auditd() should use TASK_UNINTERRUPTIBLE Oleg Nesterov
2013-05-24 17:41 ` Oleg Nesterov
2013-05-29 21:59 ` Andrew Morton
2013-05-29 22:08   ` Guy Streeter
2013-05-31 17:10   ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox