summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorRohit Gupta <rohgup@codeaurora.org>2016-12-19 10:44:16 -0800
committerRohit Gupta <rohgup@codeaurora.org>2016-12-19 11:03:43 -0800
commitd36dd7737c6ebdde116241fb68f3bf48321e4aa0 (patch)
treeee164f87fa0c7fcec15e37cd751c0fec8384a174 /include/linux/timerqueue.h
parenta80e267a8c0d61790c3d1d5f7181ebd1be39c438 (diff)
cpufreq: Register for hotplug notifier before locking hotplug
If a CPU hotplug operation occurs in parallel while a driver is registering with the cpufreq framework it can lead to the following deadlock scenario: Thread A (cpufreq_register_driver()) Thread B (cpu_down()) get_online_cpus() | atomic_inc(&cpu_hotplug.refcount) cpu_down() | mutex_lock(&cpu_add_remove_lock) | cpu_hotplug_begin() waits on cpu_hotplug.refcount to reset register_cpu_notifier() | mutex_lock(&cpu_add_remove_lock) This happens because the registration for hotplug notifiers happens inside the hotplug locked section. This change moves hotplug registration call before get_online_cpus() to avoid the deadlock. Change-Id: Ia59a3e2710133d3b3608e49938e746e58af5a6d4 Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions