diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-09-30 15:52:14 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-13 11:01:39 -0500 |
commit | b8134b027ffc884951edaf92ba9935ed6ca2d6bf (patch) | |
tree | c2002a03d12a3b049cfc305194ee45ce71508851 /arch/x86/kernel/irq_32.c | |
parent | 3e01082efd38048231bbffe71b54b98211acf492 (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/x86/kernel/irq_32.c')
0 files changed, 0 insertions, 0 deletions