Skip to contentSkip to conversation

drivers-thermal-x86_pkg_temp_thermalc-fix-lockup-of-cpu_down.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 25, 2013 Thermal

lore
Share & tools
lore
#0 lore raw

Subject: [merged] drivers-thermal-x86_pkg_temp_thermalc-fix-lockup-of-cpu_down.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 25 Jul 2013 13:38:46 -0700

The patch titled
Subject: drivers/thermal/x86_pkg_temp_thermal.c: fix lockup of cpu_down()
has been removed from the -mm tree. Its filename was
drivers-thermal-x86_pkg_temp_thermalc-fix-lockup-of-cpu_down.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Steven Rostedt <[email protected]>
Subject: drivers/thermal/x86_pkg_temp_thermal.c: fix lockup of cpu_down()

Commit f1a18a105 ("Thermal: CPU Package temperature thermal") had code that did a get_online_cpus(), run a loop and then do a put_online_cpus(). The problem is that the loop had an error exit that would skip the put_online_cpus() part.

In the error exit part of the function, it also did a get_online_cpus(), run a loop and then put_online_cpus(). The only way to get to the error exit part is with get_online_cpus() already performed. If this error condition is hit, the system will be prevented from taking CPUs offline. The process taking the CPU offline will lock up hard.

Removing the get_online_cpus() removes the lockup as the hotplug CPU refcount is back to zero.

This was bisected with ktest.

Cc Srinivas Pandruvada <[email protected]>
Cc Zhang Rui <[email protected]>
Cc Tejun Heo <[email protected]>

---

 drivers/thermal/x86_pkg_temp_thermal.c |    1 -
 1 file changed, 1 deletion(-)
drivers/thermal/x86_pkg_temp_thermal.c renamed from drivers/thermal/x86_pkg_temp_thermal.c~drivers-thermal-x86_pkg_temp_thermalc-fix-lockup-of-cpu_down +0 -1
diff -puN drivers/thermal/x86_pkg_temp_thermal.c~drivers-thermal-x86_pkg_temp_thermalc-fix-lockup-of-cpu_down 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();

_

Patches currently in -mm which might be from [email protected] are

origin.patch
relay-fix-timer-madness.patch
relay-fix-timer-madness-v2.patch
linux-next.patch