kernel-hacking-2024-linux-s.../drivers/thermal
durgadoss.r@intel.com 732e4c8db9 Thermal: Check for validity before doing kfree
The thermal_release function is called whenever
any device belonging to 'thermal' class unregisters.
This function performs kfree(cdev) without any check.
In cases where there are more device registrations
other than just 'thermal_zone' and 'cooling_device'
this might accidently free memory allocated them
silently; and cause memory errors.

This patch changes this behavior by doing
kfree(cdev) only when the device pointer belongs
to a real cdev i.e. cooling_device.

Signed-off-by: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-10-14 13:11:09 +08:00
..
samsung thermal: exynos: Clean up non-DT remnants 2013-08-29 09:37:31 -04:00
ti-soc-thermal thermal: ti-soc-thermal: Ensure to compute thermal trend 2013-08-29 09:36:18 -04:00
armada_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
cpu_cooling.c drivers: thermal: add check when unregistering cpu cooling 2013-09-03 09:10:34 -04:00
db8500_cpufreq_cooling.c thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL() 2013-04-27 09:28:38 +08:00
db8500_thermal.c thermal: db8500: Fix missing mutex_unlock() in probe error paths 2013-03-26 22:08:08 +08:00
dove_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
fair_share.c Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
imx_thermal.c thermal: imx: implement thermal alarm interrupt handling 2013-08-15 14:57:42 +08:00
intel_powerclamp.c Fix mis-merge of intel_powerclamp.c resulting in compile error 2013-02-28 20:23:09 -08:00
Kconfig thermal: Kconfig: cosmetic fixes 2013-10-09 11:51:43 +08:00
kirkwood_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
Makefile thermal: hwmon: move hwmon support to single file 2013-09-03 09:09:12 -04:00
rcar_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
spear_thermal.c Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next 2013-05-28 10:46:46 +08:00
step_wise.c thermal: step_wise: return instance->target by default 2013-08-15 15:49:20 +08:00
thermal_core.c Thermal: Check for validity before doing kfree 2013-10-14 13:11:09 +08:00
thermal_core.h Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
thermal_hwmon.c drivers: thermal: parent virtual hwmon with thermal zone 2013-09-03 09:10:10 -04:00
thermal_hwmon.h thermal: hwmon: move hwmon support to single file 2013-09-03 09:09:12 -04:00
user_space.c Thermal: build thermal governors into thermal_sys module 2013-04-14 23:28:43 +08:00
x86_pkg_temp_thermal.c Thermal: Fix lockup of cpu_down() 2013-07-22 09:34:46 +08:00