summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTu, Xiaobing <xiaobing.tu@intel.com>2012-10-23 03:03:00 +0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-10-23 03:03:00 +0400
commite37736777254ce1abc85493a5cacbefe5983b896 (patch)
treeba7bd9509dc9c771a90460d3416b1adef67cb72f /drivers
parente4df1cbcc1f329e53a1fff7450b2229e0addff20 (diff)
downloadlinux-e37736777254ce1abc85493a5cacbefe5983b896.tar.xz
Fix memory leak in cpufreq stats.
When system enters sleep, non-boot CPUs will be disabled. Cpufreq stats sysfs is created when the CPU is up, but it is not freed when the CPU is going down. This will cause memory leak. Signed-off-by: xiaobing tu <xiaobing.tu@intel.com> Signed-off-by: guifang tang <guifang.tang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpufreq_stats.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index b40ee1403be9..399831690fed 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -328,6 +328,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,
cpufreq_update_policy(cpu);
break;
case CPU_DOWN_PREPARE:
+ case CPU_DOWN_PREPARE_FROZEN:
cpufreq_stats_free_sysfs(cpu);
break;
case CPU_DEAD: