diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-09-30 15:52:14 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2011-12-28 16:25:43 -0600 |
commit | 76efb46bbddb095f9941f903a122f27ac13adfd9 (patch) | |
tree | 7f7939dee4c19a9e30b282eda26f1a93248be5d8 /arch/powerpc/kernel/irq.c | |
parent | b54c555cbaff910e207be778477494a91a5d38cf (diff) |
softirq: Fix unplug deadlock
If ksoftirqd gets woken during hot-unplug, __thread_do_softirq() will
call pin_current_cpu() which will block on the held cpu_hotplug.lock.
Moving the offline check in __thread_do_softirq() before the
pin_current_cpu() call doesn't work, since the wakeup can happen
before we mark the cpu offline.
So here we have the ksoftirq thread stuck until hotplug finishes, but
then the ksoftirq CPU_DOWN notifier issues kthread_stop() which will
wait for the ksoftirq thread to go away -- while holding the hotplug
lock.
Sort this by delaying the kthread_stop() until CPU_POST_DEAD, which is
outside of the cpu_hotplug.lock, but still serialized by the
cpu_add_remove_lock.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: rostedt <rostedt@goodmis.org>
Cc: Clark Williams <williams@redhat.com>
Link: http://lkml.kernel.org/r/1317391156.12973.3.camel@twins
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
0 files changed, 0 insertions, 0 deletions