Re: [PATCHv4 1/9] Thermal: Check for validity before doing kfree

2013-10-13 Thread Zhang Rui
On Wed, 2013-10-02 at 00:08 +0530, Durgadoss R wrote: > 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

[PATCHv4 1/9] Thermal: Check for validity before doing kfree

2013-10-01 Thread Durgadoss R
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 allocat