lkml.org 
[lkml]   [2012]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Fix memory leak in cpufreq stats.
Date
On Monday 15 of October 2012 02:48:28 Tu, Xiaobing wrote:
>
> Fix memory leak in cpufreq stats.
>
> When system enter sleep, non-boot CPUs will be disable.
> Cpufreq stats sysfs is created when the CPU is up, but it is not freed when
> the CPU 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>

I will push this patch for v3.7 in the -rc3 time frame if no one objects.

Thanks,
Rafael


> diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> index b40ee14..3998316 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:
>
> Br
> XiaoBing Tu
> PSI@System Integration Shanghai
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.


\
 
 \ /
  Last update: 2012-10-15 23:21    [W:0.054 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site