summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTu, Xiaobing <xiaobing.tu@intel.com>2012-10-23 01:03:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-14 11:32:06 -0700
commiteb868f2c44b556ddea6a88e0a1a70945364e0ee1 (patch)
tree884cc272f175192e8184d28aac41638eb8b75ca7
parent542e9d5675e96e3affcac837b358b6dadebbbc37 (diff)
Fix memory leak in cpufreq stats.
commit e37736777254ce1abc85493a5cacbefe5983b896 upstream. 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> Cc: Colin Cross <ccross@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 faf7c5217848..df41080bfcc7 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -329,6 +329,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: