From: Fernando Vazquez Date: Sun, 1 Oct 2006 06:29:09 +0000 (-0700) Subject: [PATCH] stack overflow safe kdump: crash: use safe_smp_processor_id() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ce53af9496c625a8ae33526713be34a23756db19;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [PATCH] stack overflow safe kdump: crash: use safe_smp_processor_id() Substitute "smp_processor_id" with the stack overflow-safe "safe_smp_processor_id" in the reboot path to the second kernel. [akpm@osdl.org: build fix] Signed-off-by: Fernando Vazquez Looks-reasonable-to: Andi Kleen Acked-by: "Eric W. Biederman" Cc: Vivek Goyal Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index 67d297dc1003..2dfc049dafa3 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c @@ -23,6 +23,7 @@ #include #include #include +#include #include @@ -88,7 +89,7 @@ static void crash_save_self(struct pt_regs *regs) { int cpu; - cpu = smp_processor_id(); + cpu = safe_smp_processor_id(); crash_save_this_cpu(regs, cpu); } @@ -185,7 +186,7 @@ void machine_crash_shutdown(struct pt_regs *regs) local_irq_disable(); /* Make a note of crashing cpu. Will be used in NMI callback.*/ - crashing_cpu = smp_processor_id(); + crashing_cpu = safe_smp_processor_id(); nmi_shootdown_cpus(); lapic_shutdown(); #if defined(CONFIG_X86_IO_APIC)