aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/max77620_thermal.c
diff options
context:
space:
mode:
authorMatthew Wilcox <mawilcox@microsoft.com>2017-03-10 18:33:28 +0000
committerZhang Rui <rui.zhang@intel.com>2017-03-13 10:06:04 +0800
commit088db931e065bd3b159fa2e588eab859ef0d9d23 (patch)
tree7211f7bc220cfc430e37dc4fa37dec978efbe0f7 /drivers/thermal/max77620_thermal.c
parentLinux 4.11-rc2 (diff)
downloadlinux-dev-088db931e065bd3b159fa2e588eab859ef0d9d23.tar.xz
linux-dev-088db931e065bd3b159fa2e588eab859ef0d9d23.zip
thermal: Fix potential deadlock in cpu_cooling
cooling_list_lock is covering not just cpufreq_dev_count, but also the calls to cpufreq_register_notifier() and cpufreq_unregister_notifier(). Since cooling_list_lock is also used within cpufreq_thermal_notifier(), lockdep reports a potential deadlock. Fix it by testing the condition under cooling_list_lock and dropping the lock before calling cpufreq_register_notifier(). And variable cpufreq_dev_count is removed at the same time, because it's no longer needed after the fix. Fixes: ae606089621e ("thermal: convert cpu_cooling to use an IDA") Reported-and-Tested-by: Russell King <linux@armlinux.org.uk> Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal/max77620_thermal.c')
0 files changed, 0 insertions, 0 deletions