]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: stats: do cpufreq_cpu_put() corresponding to cpufreq_cpu_get()
authorviresh kumar <viresh.kumar@linaro.org>
Fri, 22 Mar 2013 10:13:52 +0000 (10:13 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Mar 2013 14:13:16 +0000 (15:13 +0100)
commita9526a3ac7e3f724bf1e1c209ee9cfa658eb6903
tree996416fe804a88984be9ed337a151127a472eb7e
parentcc30d69a3f2720033acb3592aeb5e747eafbf1a5
cpufreq: stats: do cpufreq_cpu_put() corresponding to cpufreq_cpu_get()

In cpufreq_stats_free_sysfs() we aren't balancing calls to
cpufreq_cpu_get() with cpufreq_cpu_put(). This will never let us have
ref count to policy->kobj as zero.

We will get a hang if somehow cpufreq_driver_unregister() is called.
And that can happen when we compile our driver as module and
insmod/rmmod it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq_stats.c