public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Check for online cpus before bringing them up
@ 2006-03-16 17:44 Srivatsa Vaddagiri
  2006-03-17  1:08 ` Andrew Morton
  0 siblings, 1 reply; 31+ messages in thread
From: Srivatsa Vaddagiri @ 2006-03-16 17:44 UTC (permalink / raw)
  To: Andrew Morton, torvalds; +Cc: linux-kernel, shaohua.li, bryce

Bryce reported a bug wherein offlining CPU0 (on x86 box) and then subsequently
onlining it resulted in a lockup. 

On x86, CPU0 is never offlined. The subsequent attempt to online CPU0
doesn't take that into account. It actually tries to bootup the already
booted CPU. Following patch fixes the problem (as acknowledged by
Bryce). Please consider for inclusion in 2.6.16.




Check if cpu is already online.

Signed-off-by : Srivatsa Vaddagiri <vatsa@in.ibm.com>

-

 arch/i386/kernel/smpboot.c |    6 ++++++
 1 files changed, 6 insertions(+)

diff -puN arch/i386/kernel/smpboot.c~cpuhp arch/i386/kernel/smpboot.c
--- linux-2.6.16-rc5/arch/i386/kernel/smpboot.c~cpuhp	2006-03-14 14:42:26.000000000 +0530
+++ linux-2.6.16-rc5-root/arch/i386/kernel/smpboot.c	2006-03-14 14:43:21.000000000 +0530
@@ -1029,6 +1029,12 @@ int __devinit smp_prepare_cpu(int cpu)
 	int	apicid, ret;
 
 	lock_cpu_hotplug();
+
+	if (cpu_online(cpu)) {
+		ret = -EINVAL;
+		goto exit;
+	}
+
 	apicid = x86_cpu_to_apicid[cpu];
 	if (apicid == BAD_APICID) {
 		ret = -ENODEV;

_


-- 
Regards,
vatsa

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2006-11-08  5:54 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-16 17:44 [PATCH] Check for online cpus before bringing them up Srivatsa Vaddagiri
2006-03-17  1:08 ` Andrew Morton
2006-03-17  1:16   ` Shaohua Li
2006-03-17  8:46   ` Srivatsa Vaddagiri
2006-03-17  9:04     ` Andrew Morton
2006-03-17 14:13       ` Srivatsa Vaddagiri
2006-03-18 14:09         ` Ashok Raj
2006-03-21  1:08           ` Shaohua Li
2006-03-21  1:25             ` Ashok Raj
2006-03-21  1:36               ` Shaohua Li
2006-10-06 23:10       ` Status on CPU hotplug issues Bryce Harrington
2006-10-06 23:29         ` Andrew Morton
2006-10-07  0:00           ` Bryce Harrington
2006-10-07 10:35             ` Pavel Machek
2006-10-07 20:42               ` Bryce Harrington
2006-10-08 18:29                 ` Heiko Carstens
2006-10-08 19:14                   ` Pavel Machek
2006-10-11  1:08                     ` [BUG] 2.6.19-rc1-mm1: fs/file.c138 on ia64 Bryce Harrington
2006-10-11  1:15                       ` Andrew Morton
2006-10-11  5:38                         ` Bryce Harrington
2006-10-07 10:24           ` Status on CPU hotplug issues Pavel Machek
2006-10-07 20:25             ` Bryce Harrington
2006-10-08 19:13               ` Pavel Machek
2006-10-09  7:42                 ` Bryce Harrington
2006-10-07 21:57         ` Pavel Machek
2006-10-09 21:40           ` Randy Dunlap
2006-10-23 22:26             ` Bryce Harrington
2006-11-08  5:35               ` Randy Dunlap
2006-11-08  5:52                 ` Bryce Harrington
2006-03-17 12:21     ` [PATCH] Check for online cpus before bringing them up Ashok Raj
2006-03-17 13:59       ` Srivatsa Vaddagiri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox