diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-05-24 10:15:43 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-05-26 10:10:48 +0200 |
commit | 49dfe2a6779717d9c18395684ee31bdc98b22e53 (patch) | |
tree | d8a067fdbef6e58d980d3137c7fa6f8a27d212ea /drivers/dma-buf/Makefile | |
parent | acpi/processor: Prevent cpu hotplug deadlock (diff) | |
download | linux-49dfe2a6779717d9c18395684ee31bdc98b22e53.tar.xz linux-49dfe2a6779717d9c18395684ee31bdc98b22e53.zip |
cpuhotplug: Link lock stacks for hotplug callbacks
The CPU hotplug callbacks are not covered by lockdep versus the cpu hotplug
rwsem.
CPU0 CPU1
cpuhp_setup_state(STATE, startup, teardown);
cpus_read_lock();
invoke_callback_on_ap();
kick_hotplug_thread(ap);
wait_for_completion(); hotplug_thread_fn()
lock(m);
do_stuff();
unlock(m);
Lockdep does not know about this dependency and will not trigger on the
following code sequence:
lock(m);
cpus_read_lock();
Add a lockdep map and connect the initiators lock chain with the hotplug
thread lock chain, so potential deadlocks can be detected.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20170524081549.709375845@linutronix.de
Diffstat (limited to 'drivers/dma-buf/Makefile')
0 files changed, 0 insertions, 0 deletions