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-next>] [day] [month] [year] [list]
Date:	Sat, 20 Jul 2013 22:48:03 +0200
From:	"Rafael J. Wysocki" <rjw@...ysocki.net>
To:	Zhang Rui <rui.zhang@...el.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: thermal / x86: Fix init error code path in package temperature driver

From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

The error code path of the x86 package temperature thermal driver's
initialization routine, pkg_temp_thermal_init(), makes an unbalanced
call to get_online_cpus(), which causes subsequent CPU offline
operations, and consequently system suspend, to permanently block
in cpu_hotplug_begin() on systems where get_core_online() returns
an error code.

Remove the extra get_online_cpus() to fix the problem (tested on
Toshiba Portege R500).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
 drivers/thermal/x86_pkg_temp_thermal.c |    1 -
 1 file changed, 1 deletion(-)

Index: linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/x86_pkg_temp_thermal.c
+++ linux-pm/drivers/thermal/x86_pkg_temp_thermal.c
@@ -592,7 +592,6 @@ static int __init pkg_temp_thermal_init(
 	return 0;
 
 err_ret:
-	get_online_cpus();
 	for_each_online_cpu(i)
 		put_core_offline(i);
 	put_online_cpus();

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