linux/arch
Zhang, Yanmin fcb43042ef x86: fix cpu hotplug crash
Vegard Nossum reported crashes during cpu hotplug tests:

  http://marc.info/?l=linux-kernel&m=121413950227884&w=4

In function _cpu_up, the panic happens when calling
__raw_notifier_call_chain at the second time. Kernel doesn't panic when
calling it at the first time. If just say because of nr_cpu_ids, that's
not right.

By checking the source code, I found that function do_boot_cpu is the culprit.
Consider below call chain:
 _cpu_up=>__cpu_up=>smp_ops.cpu_up=>native_cpu_up=>do_boot_cpu.

So do_boot_cpu is called in the end. In do_boot_cpu, if
boot_error==true, cpu_clear(cpu, cpu_possible_map) is executed. So later
on, when _cpu_up calls __raw_notifier_call_chain at the second time to
report CPU_UP_CANCELED, because this cpu is already cleared from
cpu_possible_map, get_cpu_sysdev returns NULL.

Many resources are related to cpu_possible_map, so it's better not to
change it.

Below patch against 2.6.26-rc7 fixes it by removing the bit clearing in
cpu_possible_map.

Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Tested-by: Vegard Nossum <vegard.nossum@gmail.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-06-30 13:15:43 +02:00
..
alpha [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
arm [ARM] 5077/1: spi: fix list scan success verification in PXA ssp driver 2008-06-11 23:38:46 +01:00
avr32 avr32: Fix cpufreq oops when ondemand governor is default 2008-05-27 09:37:42 +02:00
blackfin Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN 2008-06-07 15:03:01 +08:00
cris [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
frv Fix various old email addresses for dwmw2 2008-06-06 11:29:10 -07:00
h8300 [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2008-06-16 11:52:43 -07:00
m32r [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
m68k m68k: enable CONFIG_COMPAT_BRK by default 2008-06-06 11:29:09 -07:00
m68knommu m68knommu: init coldfire timer TRR with n - 1, not n 2008-06-12 18:05:40 -07:00
mips [MIPS] Au1200: MMC resource size off by one 2008-06-16 15:14:49 +01:00
mn10300 MN10300: Kill linux/a.out.h inclusions 2008-06-16 10:20:57 -07:00
parisc parisc: fix off by one in setup_sigcontext32 2008-06-13 10:49:55 -04:00
powerpc [POWERPC] Clear sub-page HPTE present bits when demoting page size 2008-06-18 21:40:43 +10:00
ppc [POWERPC] Export empty_zero_page and copy_page in arch/ppc 2008-05-31 17:08:28 +10:00
s390 Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-06-11 10:35:44 -07:00
sh sh: Add -mno-fdpic to default flags. 2008-06-09 16:49:43 +09:00
sparc sparc: switch /proc/led to seq_file 2008-06-03 15:21:21 -07:00
sparc64 sparc64: Prevent stack backtrace false positives on trap frames. 2008-05-21 21:50:01 -07:00
um uml: work around broken host PTRACE_SYSEMU 2008-06-12 18:05:40 -07:00
v850 [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
x86 x86: fix cpu hotplug crash 2008-06-30 13:15:43 +02:00
xtensa [PATCH] take init_files to fs/file.c 2008-05-16 17:22:20 -04:00
.gitignore
Kconfig dma: add dma_*map*_attrs() interfaces 2008-04-29 08:06:11 -07:00