lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <EE928378561BF1449699C96571234A740FE67925@SHSMSX102.ccr.corp.intel.com>
Date:	Mon, 15 Oct 2012 07:04:07 +0000
From:	"Tu, Xiaobing" <xiaobing.tu@...el.com>
To:	"Tu, Xiaobing" <xiaobing.tu@...el.com>,
	"davej@...hat.com" <davej@...hat.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"rusty@...tcorp.com.au" <rusty@...tcorp.com.au>,
	"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"rostedt@...dmis.org" <rostedt@...dmis.org>
CC:	"Tang, Guifang" <guifang.tang@...el.com>,
	"Zuo, Alex" <alex.zuo@...el.com>
Subject: RE: Fix memory leak in cpufreq stats.

+alex

-----Original Message-----
From: Tu, Xiaobing 
Sent: Monday, October 15, 2012 10:48 AM
To: 'davej@...hat.com'; 'akpm@...ux-foundation.org'; 'mingo@...e.hu'; 'rusty@...tcorp.com.au'; 'a.p.zijlstra@...llo.nl'; 'linux-kernel@...r.kernel.org'; 'rostedt@...dmis.org'
Cc: Tang, Guifang; Tu, Xiaobing
Subject: Fix memory leak in cpufreq stats.


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@...el.com>
signed-off-by: guifang tang <guifang.tang@...el.com>

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@...tem Integration Shanghai


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ