aboutsummaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorMike Galbraith <[email protected]>2017-02-13 03:31:55 +0100
committerThomas Gleixner <[email protected]>2017-02-13 09:49:31 +0100
commit202461e2f3c15dbfb05825d29ace0d20cdf55fa4 (patch)
tree133b42876fb28c1bd8634c6c03d276b53fb10a8c /lib/test-string_helpers.c
parent7089db84e356562f8ba737c29e472cc42d530dbc (diff)
tick/broadcast: Prevent deadlock on tick_broadcast_lock
tick_broadcast_lock is taken from interrupt context, but the following call chain takes the lock without disabling interrupts: [ 12.703736] _raw_spin_lock+0x3b/0x50 [ 12.703738] tick_broadcast_control+0x5a/0x1a0 [ 12.703742] intel_idle_cpu_online+0x22/0x100 [ 12.703744] cpuhp_invoke_callback+0x245/0x9d0 [ 12.703752] cpuhp_thread_fun+0x52/0x110 [ 12.703754] smpboot_thread_fn+0x276/0x320 So the following deadlock can happen: lock(tick_broadcast_lock); <Interrupt> lock(tick_broadcast_lock); intel_idle_cpu_online() is the only place which violates the calling convention of tick_broadcast_control(). This was caused by the removal of the smp function call in course of the cpu hotplug rework. Instead of slapping local_irq_disable/enable() at the call site, we can relax the calling convention and handle it in the core code, which makes the whole machinery more robust. Fixes: 29d7bbada98e ("intel_idle: Remove superfluous SMP fuction call") Reported-by: Gabriel C <[email protected]> Signed-off-by: Mike Galbraith <[email protected]> Cc: Ruslan Ruslichenko <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Greg KH <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: [email protected] Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Anna-Maria Gleixner <[email protected]> Cc: Sebastian Siewior <[email protected]> Cc: stable <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions