x86: fix early panic with boot option "nosmp"
authorAndi Kleen <andi@firstfloor.org>
Thu, 4 Dec 2008 12:33:35 +0000 (13:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 4 Dec 2008 15:33:51 +0000 (16:33 +0100)
Impact: fix boot crash with numcpus=0 on certain systems

Fix early exception in __get_smp_config with nosmp.

Bail out early when there is no MP table.

Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/mpparse.c

index f98f4e1dba0963ddc4908074a7a16e3249703677..0f4c1fd5a1f434259afd90480b5af527b326b855 100644 (file)
@@ -604,6 +604,9 @@ static void __init __get_smp_config(unsigned int early)
                printk(KERN_INFO "Using ACPI for processor (LAPIC) "
                       "configuration information\n");
 
+       if (!mpf)
+               return;
+
        printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n",
               mpf->mpf_specification);
 #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)