From: Peter Zijlstra Date: Thu, 2 Oct 2014 10:22:51 +0000 (+0200) Subject: audit, sched/wait: Fixup kauditd_thread() wait loop X-Git-Tag: omap-for-v3.20/drop-legacy-3517~162^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b55fc63f46ba299f3d84013e9232be4bd259eab;p=pandora-kernel.git audit, sched/wait: Fixup kauditd_thread() wait loop The kauditd_thread wait loop is a bit iffy; it has a number of problems: - calls try_to_freeze() before schedule(); you typically want the thread to re-evaluate the sleep condition when unfreezing, also freeze_task() issues a wakeup. - it unconditionally does the {add,remove}_wait_queue(), even when the sleep condition is false. Use wait_event_freezable() that does the right thing. Reported-by: Mike Galbraith Signed-off-by: Peter Zijlstra (Intel) Cc: Eric Paris Cc: oleg@redhat.com Cc: Eric Paris Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20141002102251.GA6324@worktop.programming.kicks-ass.net Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed