diff options
author | Tejun Heo <tj@kernel.org> | 2011-04-29 18:08:37 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-09 15:06:37 -0700 |
commit | 5a19c7ecdc631407d490d206b80ed790daad99cd (patch) | |
tree | c1cb59e08e914df903ca5f70ba6264033b62c5b6 /kernel/kthread.c | |
parent | bcd0df39767d1c4352566d909291deac099b222b (diff) |
workqueue: fix deadlock in worker_maybe_bind_and_lock()
commit 5035b20fa5cd146b66f5f89619c20a4177fb736d upstream.
If a rescuer and stop_machine() bringing down a CPU race with each
other, they may deadlock on non-preemptive kernel. The CPU won't
accept a new task, so the rescuer can't migrate to the target CPU,
while stop_machine() can't proceed because the rescuer is holding one
of the CPU retrying migration. GCWQ_DISASSOCIATED is never cleared
and worker_maybe_bind_and_lock() retries indefinitely.
This problem can be reproduced semi reliably while the system is
entering suspend.
http://thread.gmane.org/gmane.linux.kernel/1122051
A lot of kudos to Thilo-Alexander for reporting this tricky issue and
painstaking testing.
stable: This affects all kernels with cmwq, so all kernels since and
including v2.6.36 need this fix.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Thilo-Alexander Ginkel <thilo@ginkel.com>
Tested-by: Thilo-Alexander Ginkel <thilo@ginkel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/kthread.c')
0 files changed, 0 insertions, 0 deletions