summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/Kconfig
diff options
context:
space:
mode:
authordurgadoss.r@intel.com <durgadoss.r@intel.com>2013-10-02 00:08:00 +0530
committerZhang Rui <rui.zhang@intel.com>2013-10-14 13:11:09 +0800
commit732e4c8db99cb3125bd6865794ec8e3a998c4d6e (patch)
treec6cf8ad76b759bbd5dd2e44579274dc4311fc3cb /drivers/thermal/Kconfig
parenta822794886e9746b30b62d11e594865bcc7a0988 (diff)
downloadop-kernel-dev-732e4c8db99cb3125bd6865794ec8e3a998c4d6e.zip
op-kernel-dev-732e4c8db99cb3125bd6865794ec8e3a998c4d6e.tar.gz
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>
Diffstat (limited to 'drivers/thermal/Kconfig')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud