Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] x86: check for online cpus before bringing them up

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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Srivatsa Vaddagiri and committed by
Linus Torvalds
82c3c03a 8532159f

+10
+10
arch/i386/kernel/smpboot.c
··· 1029 1029 int apicid, ret; 1030 1030 1031 1031 lock_cpu_hotplug(); 1032 + 1033 + /* 1034 + * On x86, CPU0 is never offlined. Trying to bring up an 1035 + * already-booted CPU will hang. So check for that case. 1036 + */ 1037 + if (cpu_online(cpu)) { 1038 + ret = -EINVAL; 1039 + goto exit; 1040 + } 1041 + 1032 1042 apicid = x86_cpu_to_apicid[cpu]; 1033 1043 if (apicid == BAD_APICID) { 1034 1044 ret = -ENODEV;