diff options
| author | Thomas Gleixner <[email protected]> | 2017-05-24 10:15:43 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2017-05-26 10:10:48 +0200 | 
| commit | 49dfe2a6779717d9c18395684ee31bdc98b22e53 (patch) | |
| tree | d8a067fdbef6e58d980d3137c7fa6f8a27d212ea /tools/perf/scripts/python/netdev-times.py | |
| parent | 0266d81e9bf5cc1fe6405c0523dfa015fe55aae1 (diff) | |
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 <[email protected]>
Tested-by: Paul E. McKenney <[email protected]>
Acked-by: Ingo Molnar <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sebastian Siewior <[email protected]>
Cc: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions