android_kernel_asus_sm8350/drivers/devfreq
Amir Vajid d0142cbf68 devfreq: memlat: fix potential deadlock during CPU hotplug
The cpu_grp->mons_lock is acquired in the memlat hotplug notifier
callbacks to prevent races within the driver. The cpus_read_lock is
inherently acquired as well since it is in the middle of a hotplug
event. In parallel, stop_hwmon() could unregister from the hotplug
notifier (i.e. when last memlat mon in system is removed). However,
unregistering the hotplug notifier also requires the cpus_read_lock
and is done with the cpu_grp->mons_lock held as well which would lead
to a deadlock if a hotplug is currently in progress with the memlat
notifier callback waiting for the cpu_grp->mons_lock.

To fix this, release the cpu_grp->mons_lock in stop_hwmon() before
unregistering with the hotplug notifier. Also, make sure the memlat
hotplug notifier callbacks check cpu_grp->num_active_mons before
restarting events since that work won't be necessary if there are no
active memlat mons in the system.

Change-Id: I401639a6e28a472a64a96456d2c06f57b35dbc0d
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2020-06-09 16:46:50 -07:00
..
event PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency 2020-02-24 08:36:41 +01:00
arm-memlat-mon.c devfreq: memlat: fix potential deadlock during CPU hotplug 2020-06-09 16:46:50 -07:00
bimc-bwmon.c devfreq: update sampling window timer limit 2020-03-20 14:40:08 -07:00
devfreq_icc.c PM / devfreq: icc: add support for L3 BW devices 2020-05-28 21:27:20 -07:00
devfreq_qcom_qoslat.c PM / devfreq: qoslat: implement get_dev_status() 2020-05-14 11:17:07 -07:00
devfreq_simple_dev.c devfreq: suppress platform driver bind / unbind feature 2019-12-06 08:50:38 -08:00
devfreq-event.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
devfreq.c Merge android-5.4.24 (ce5de62) into msm-5.4 2020-04-14 08:25:29 -07:00
exynos-bus.c PM / devfreq: exynos-bus: Convert to use dev_pm_opp_set_rate() 2019-08-25 12:46:48 +09:00
governor_bw_hwmon.c devfreq: update sample_ms tunnable store function 2020-03-20 14:39:40 -07:00
governor_bw_hwmon.h PM / devfreq: Fix CONFIG check for cache HW monitor prototype 2020-01-15 09:01:15 -07:00
governor_cache_hwmon.c PM / devfreq: Make governor registration less verbose 2020-01-24 11:17:39 -08:00
governor_cache_hwmon.h PM / devfreq: Fix CONFIG check for cache HW monitor prototype 2020-01-15 09:01:15 -07:00
governor_memlat.c PM / devfreq: memlat: fix suspend/resume calls to devfreq_monitor 2020-03-16 16:37:37 -07:00
governor_memlat.h PM /devfreq: Fix function prototype 2020-01-15 09:01:14 -07:00
governor_passive.c PM / devfreq: passive: fix compiler warning 2019-08-26 21:37:37 +09:00
governor_performance.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
governor_powersave.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
governor_simpleondemand.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
governor_userspace.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
governor.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig Merge android-5.4.24 (ce5de62) into msm-5.4 2020-04-14 08:25:29 -07:00
Makefile PM / devfreq: Add support for memory latency QoS voting 2019-12-06 08:51:26 -08:00
rk3399_dmc.c PM / devfreq: rk3399_dmc: Fix spelling typo 2019-08-24 20:11:12 +09:00
tegra20-devfreq.c PM / devfreq: Introduce driver for NVIDIA Tegra20 2019-08-24 20:11:12 +09:00
tegra30-devfreq.c PM / devfreq: tegra: Rename tegra-devfreq.c to tegra30-devfreq.c 2019-08-24 20:11:12 +09:00