[PATCH 01/17] thermal: cpu_cooling: Avoid accessing potentially freed structures

2017-03-15 Thread Viresh Kumar
After the lock is dropped, it is possible that the cpufreq_dev gets freed before we call get_level() and that can cause kernel to crash. Drop the lock after we are done using the structure. Cc: 4.2+ Fixes: 02373d7c69b4 ("thermal: cpu_cooling: fix lockdep problems in

[PATCH 01/17] thermal: cpu_cooling: Avoid accessing potentially freed structures

2017-03-15 Thread Viresh Kumar
After the lock is dropped, it is possible that the cpufreq_dev gets freed before we call get_level() and that can cause kernel to crash. Drop the lock after we are done using the structure. Cc: 4.2+ Fixes: 02373d7c69b4 ("thermal: cpu_cooling: fix lockdep problems in cpu_cooling")