linux-stable/drivers/thermal
Ahmad Fatoum ac4436a5b2 thermal: of: fix double-free on unregistration
Since commit 3d439b1a2a ("thermal/core: Alloc-copy-free the thermal
zone parameters structure"), thermal_zone_device_register() allocates
a copy of the tzp argument and frees it when unregistering, so
thermal_of_zone_register() now ends up leaking its original tzp and
double-freeing the tzp copy. Fix this by locating tzp on stack instead.

Fixes: 3d439b1a2a ("thermal/core: Alloc-copy-free the thermal zone parameters structure")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: 6.4+ <stable@vger.kernel.org> # 6.4+: 8bcbb18c61d6: thermal: core: constify params in thermal_zone_device_register
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-07-24 09:51:31 +02:00
..
broadcom
intel Thermal control updates for 6.5-rc1 2023-06-26 19:41:26 -07:00
mediatek thermal/drivers/mediatek/lvts_thermal: Remove redundant msg in lvts_ctrl_start() 2023-06-26 12:03:14 +02:00
qcom thermal/drivers/qcom/temp-alarm: Use dev_err_probe 2023-06-26 12:10:22 +02:00
samsung
st thermal/drivers/stm32: Convert to platform remove callback returning void 2023-06-26 12:03:14 +02:00
tegra thermal/drivers/tegra: Remove redundant msg in tegra_tsensor_register_channel() 2023-06-26 12:03:14 +02:00
ti-soc-thermal thermal/drivers/ti-soc: Remove redundant msg in ti_thermal_expose_sensor() 2023-06-26 12:03:14 +02:00
amlogic_thermal.c thermal/drivers/amlogic: Remove redundant msg in amlogic_thermal_probe() 2023-06-26 12:03:14 +02:00
armada_thermal.c thermal/drivers/armada: Add support for AP807 thermal data 2023-06-26 12:03:14 +02:00
cpufreq_cooling.c
cpuidle_cooling.c More thermal control updates for 6.4-rc1 2023-05-03 11:46:01 -07:00
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c
gov_power_allocator.c
gov_step_wise.c thermal: gov_step_wise: Adjust code logic to match comment 2023-04-27 19:17:11 +02:00
gov_user_space.c
hisi_thermal.c
imx8mm_thermal.c thermal/drivers/imx: Remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe() 2023-06-26 12:03:14 +02:00
imx_sc_thermal.c thermal/drivers/imx: Remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe() 2023-06-26 12:03:14 +02:00
imx_thermal.c
k3_bandgap.c drivers/thermal/k3: Remove redundant msg in k3_bandgap_probe() 2023-06-26 12:03:14 +02:00
k3_j72xx_bandgap.c
Kconfig thermal: Allow selecting the bang-bang governor as default 2023-06-26 12:03:13 +02:00
khadas_mcu_fan.c
kirkwood_thermal.c
Makefile
max77620_thermal.c
qoriq_thermal.c thermal/drivers/qoriq: Remove redundant msg in qoriq_tmu_register_tmu_zone() 2023-06-26 12:03:14 +02:00
rcar_gen3_thermal.c drivers/thermal/rcar_gen3_thermal: add reading fuses for Gen4 2023-06-26 12:03:13 +02:00
rcar_thermal.c
rockchip_thermal.c
rzg2l_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c thermal/drivers/sun8i: Remove redundant msg in sun8i_ths_register() 2023-06-26 12:03:14 +02:00
thermal-generic-adc.c thermal/drivers/generic-adc: Register thermal zones as hwmon sensors 2023-06-26 12:03:14 +02:00
thermal_acpi.c
thermal_core.c thermal: core: constify params in thermal_zone_device_register 2023-07-24 09:51:31 +02:00
thermal_core.h thermal: Allow selecting the bang-bang governor as default 2023-06-26 12:03:13 +02:00
thermal_helpers.c
thermal_hwmon.c thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() 2023-06-26 12:03:14 +02:00
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c
thermal_netlink.h
thermal_of.c thermal: of: fix double-free on unregistration 2023-07-24 09:51:31 +02:00
thermal_sysfs.c
thermal_trace.h
thermal_trace_ipa.h
thermal_trip.c
uniphier_thermal.c