summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFernando Vazquez <fernando@intellilink.co.jp>2006-09-30 23:29:09 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 00:39:31 -0700
commitce53af9496c625a8ae33526713be34a23756db19 (patch)
treec1d9b2ab0d4b2b89453e2f2a032fa0505492e85e /arch
parent2654c08caa12a06237b28f85446ae2d223c30144 (diff)
downloadop-kernel-dev-ce53af9496c625a8ae33526713be34a23756db19.zip
op-kernel-dev-ce53af9496c625a8ae33526713be34a23756db19.tar.gz
[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 <fernando@intellilink.co.jp> Looks-reasonable-to: Andi Kleen <ak@muc.de> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/crash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c
index 67d297d..2dfc049 100644
--- a/arch/i386/kernel/crash.c
+++ b/arch/i386/kernel/crash.c
@@ -23,6 +23,7 @@
#include <asm/hw_irq.h>
#include <asm/apic.h>
#include <asm/kdebug.h>
+#include <asm/smp.h>
#include <mach_ipi.h>
@@ -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)
OpenPOWER on IntegriCloud