diff options
author | Fernando Vazquez <fernando@intellilink.co.jp> | 2006-10-01 02:29:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:31 -0400 |
commit | ce53af9496c625a8ae33526713be34a23756db19 (patch) | |
tree | c1d9b2ab0d4b2b89453e2f2a032fa0505492e85e | |
parent | 2654c08caa12a06237b28f85446ae2d223c30144 (diff) |
[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>
-rw-r--r-- | arch/i386/kernel/crash.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 @@ | |||
23 | #include <asm/hw_irq.h> | 23 | #include <asm/hw_irq.h> |
24 | #include <asm/apic.h> | 24 | #include <asm/apic.h> |
25 | #include <asm/kdebug.h> | 25 | #include <asm/kdebug.h> |
26 | #include <asm/smp.h> | ||
26 | 27 | ||
27 | #include <mach_ipi.h> | 28 | #include <mach_ipi.h> |
28 | 29 | ||
@@ -88,7 +89,7 @@ static void crash_save_self(struct pt_regs *regs) | |||
88 | { | 89 | { |
89 | int cpu; | 90 | int cpu; |
90 | 91 | ||
91 | cpu = smp_processor_id(); | 92 | cpu = safe_smp_processor_id(); |
92 | crash_save_this_cpu(regs, cpu); | 93 | crash_save_this_cpu(regs, cpu); |
93 | } | 94 | } |
94 | 95 | ||
@@ -185,7 +186,7 @@ void machine_crash_shutdown(struct pt_regs *regs) | |||
185 | local_irq_disable(); | 186 | local_irq_disable(); |
186 | 187 | ||
187 | /* Make a note of crashing cpu. Will be used in NMI callback.*/ | 188 | /* Make a note of crashing cpu. Will be used in NMI callback.*/ |
188 | crashing_cpu = smp_processor_id(); | 189 | crashing_cpu = safe_smp_processor_id(); |
189 | nmi_shootdown_cpus(); | 190 | nmi_shootdown_cpus(); |
190 | lapic_shutdown(); | 191 | lapic_shutdown(); |
191 | #if defined(CONFIG_X86_IO_APIC) | 192 | #if defined(CONFIG_X86_IO_APIC) |