linux-stable/drivers/thermal
Kant Fan 4138a88d64 thermal: devfreq_cooling: use local ops instead of global ops
commit b947769b8f upstream.

Fix access illegal address problem in following condition:

There are multiple devfreq cooling devices in system, some of them has
EM model but others do not. Energy model ops such as state2power will
append to global devfreq_cooling_ops when the cooling device with
EM model is registered. It makes the cooling device without EM model
also use devfreq_cooling_ops after appending when registered later by
of_devfreq_cooling_register_power() or of_devfreq_cooling_register().

The IPA governor regards the cooling devices without EM model as a power
actor, because they also have energy model ops, and will access illegal
address at dfc->em_pd when execute cdev->ops->get_requested_power,
cdev->ops->state2power or cdev->ops->power2state.

Fixes: 615510fe13 ("thermal: devfreq_cooling: remove old power model and use EM")
Cc: 5.13+ <stable@vger.kernel.org> # 5.13+
Signed-off-by: Kant Fan <kant@allwinnertech.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-09 10:26:26 +02:00
..
broadcom thermal/drivers/broadcom: Fix potential NULL dereference in sr_thermal_probe 2022-06-09 10:25:55 +02:00
intel thermal: int340x: Fix attr.show callback prototype 2022-05-09 09:16:30 +02:00
qcom thermal/drivers/tsens: Add timeout to get_temp_tsens_valid 2021-10-16 20:24:43 +02:00
samsung thermal/drivers/exynos: Fix an error code in exynos_tmu_probe() 2021-08-14 12:40:35 +02:00
st thermal/drivers/st: Use devm_platform_get_and_ioremap_resource() 2021-06-14 19:01:15 +02:00
tegra thermal/drivers/tegra-soctherm: Silence message about clamped temperature 2021-08-14 15:44:15 +02:00
ti-soc-thermal thermal/ti-soc-thermal: Fix kernel-doc 2021-05-24 22:38:05 +02:00
Kconfig thermal/drivers: Add TSU driver for RZ/G2L 2021-11-30 17:27:56 +01:00
Makefile thermal/drivers: Add TSU driver for RZ/G2L 2021-11-30 17:27:56 +01:00
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c thermal: cpufreq_cooling: Use new thermal pressure update function 2021-11-23 15:10:26 +05:30
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c thermal: devfreq_cooling: use local ops instead of global ops 2022-06-09 10:26:26 +02:00
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c
gov_power_allocator.c
gov_step_wise.c
gov_user_space.c thermal: Replace pr_warn() with pr_warn_once() in user_space_bind() 2021-11-05 17:47:14 +01:00
hisi_thermal.c
imx8mm_thermal.c thermal/drivers/imx8mm: Enable ADC when enabling monitor 2021-12-02 11:12:24 +01:00
imx_sc_thermal.c thermal/drivers/imx_sc_thermal: Fix refcount leak in imx_sc_thermal_probe 2022-06-09 10:25:56 +02:00
imx_thermal.c thermal/drivers/imx: Implement runtime PM support 2021-11-30 15:42:28 +01:00
k3_bandgap.c
khadas_mcu_fan.c
kirkwood_thermal.c
max77620_thermal.c
mtk_thermal.c thermal/drivers/mediatek: Add sensors-support 2021-07-04 18:28:04 +02:00
qoriq_thermal.c
rcar_gen3_thermal.c thermal: rcar_gen3_thermal: Read calibration from hardware 2021-10-15 09:15:52 +02:00
rcar_thermal.c
rockchip_thermal.c thermal/drivers/rockchip_thermal: Allow more resets for tsadc node 2021-10-17 00:15:09 +02:00
rzg2l_thermal.c thermal/drivers/rz2gl: Add error check for reset_control_deassert() 2021-12-09 15:58:09 +01:00
spear_thermal.c
sprd_thermal.c thermal/drivers/sprd: Add missing of_node_put for loop iteration 2021-06-14 22:42:09 +02:00
sun8i_thermal.c
thermal-generic-adc.c
thermal_core.c thermal/core: Fix memory leak in __thermal_cooling_device_register() 2022-06-09 10:25:55 +02:00
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c thermal/drivers/thermal_mmio: Constify static struct thermal_mmio_ops 2021-10-07 15:18:31 +02:00
thermal_netlink.c thermal: core: Fix TZ_GET_TRIP NULL pointer dereference 2022-03-01 16:11:38 +01:00
thermal_netlink.h thermal/drivers/netlink: Add the temperature when crossing a trip point 2021-10-07 15:41:38 +02:00
thermal_of.c thermal: Fix NULL pointer dereferences in of_thermal_ functions 2021-11-05 17:35:56 +01:00
thermal_sysfs.c thermal/core: Deprecate changing cooling device state from userspace 2021-10-21 17:35:11 +02:00
uniphier_thermal.c thermal/drivers/uniphier: Add compatible string for NX1 SoC 2021-10-18 14:00:13 +02:00