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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411633925-9018-4-git-send-email-tianyu.lan@intel.com>
Date:	Thu, 25 Sep 2014 16:32:05 +0800
From:	Lan Tianyu <tianyu.lan@...el.com>
To:	peterz@...radead.org, mingo@...nel.org, rafael.j.wysocki@...el.com,
	toshi.kani@...com, akpm@...ux-foundation.org, tianyu.lan@...el.com,
	ktkhai@...allels.com, fabf@...net.be, laijs@...fujitsu.com,
	srivatsa.bhat@...ux.vnet.ibm.com, ego@...ux.vnet.ibm.com,
	srivatsa@....edu, viresh.kumar@...aro.org
Cc:	todd.e.brandt@...ux.intel.com, tipbot@...or.com,
	wangyun@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org
Subject: [RFC PATCH V3 3/3] Cpufreq: Hold cpu_add_remove_lock before change cpufreq_suspended flag

Now, enabling non-boot cpus will parallel with resuming devices.
Cpu online may take place after cpufreq resume. But all cpu should be up
before clearing cpufreq_suspended flag in the cpufreq_resume(). Cpufreq
core uses this flag to decide to do light-weight init or full init. Light
-weight init/tear down is dedicated for cpu hotplug during system pm. To
keep this rule, hold cpu_add_remove_lock during changing cpufreq_suspended
flag.

Signed-off-by: Lan Tianyu <tianyu.lan@...el.com>
---
 drivers/cpufreq/cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 37951ec..b03f7dd 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1689,7 +1689,9 @@ void cpufreq_resume(void)
 	if (!cpufreq_driver)
 		return;
 
+	cpu_maps_update_begin();
 	cpufreq_suspended = false;
+	cpu_maps_update_done();
 
 	if (!has_target())
 		return;
-- 
1.8.4.rc0.1.g8f6a3e5.dirty

--
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