diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-17 00:20:34 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-18 04:40:35 -0400 |
commit | 30e1e6d1af2b67558bccf322af2b3e0676b209ae (patch) | |
tree | dae658631d0bb038c373cc2ba34ecf43f31ebd25 /arch/x86/include | |
parent | 082edb7bf443eb8eda15b482d16ad9dd8137ad24 (diff) |
cpumask: fix CONFIG_CPUMASK_OFFSTACK=y cpu hotunplug crash
Impact: Fix cpu offline when CONFIG_MAXSMP=y
Changeset bc9b83dd1f66402b870301c3c7117b9c1484abb4 "cpumask: convert
c1e_mask in arch/x86/kernel/process.c to cpumask_var_t" contained a
bug: c1e_mask is manipulated even if C1E isn't detected (and hence
not allocated).
This is simply fixed by checking for NULL (which gcc optimizes out
anyway of CONFIG_CPUMASK_OFFSTACK=n, since it knows ce1_mask can never
be NULL).
In addition, fix a leak where select_idle_routine re-allocates
(and re-clears) c1e_mask on every cpu init.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mike Travis <travis@sgi.com>
LKML-Reference: <200903171450.34549.rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/processor.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index d794d9483c56..9874dd98a29f 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -733,6 +733,7 @@ static inline void __sti_mwait(unsigned long eax, unsigned long ecx) | |||
733 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); | 733 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); |
734 | 734 | ||
735 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 735 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
736 | extern void init_c1e_mask(void); | ||
736 | 737 | ||
737 | extern unsigned long boot_option_idle_override; | 738 | extern unsigned long boot_option_idle_override; |
738 | extern unsigned long idle_halt; | 739 | extern unsigned long idle_halt; |