diff options
author | Matthew Wilcox <mawilcox@microsoft.com> | 2017-03-10 18:33:28 +0000 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2017-03-13 10:06:04 +0800 |
commit | 088db931e065bd3b159fa2e588eab859ef0d9d23 (patch) | |
tree | 7211f7bc220cfc430e37dc4fa37dec978efbe0f7 /drivers/irqchip/irq-gic-v3.c | |
parent | 4495c08e84729385774601b5146d51d9e5849f81 (diff) | |
download | linux-088db931e065bd3b159fa2e588eab859ef0d9d23.tar.bz2 |
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/irqchip/irq-gic-v3.c')
0 files changed, 0 insertions, 0 deletions