summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/dumpstack_64.c
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@fastmail.fm>2008-10-22 12:00:10 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-22 14:00:23 +0200
commit0ed7a498f416dcfa1cca478a559238a2a3396240 (patch)
tree77e82cde06f9768e38fe047159ca7d4f9d7110a5 /arch/x86/kernel/dumpstack_64.c
parentx86, dumpstack: let signr=0 signal no do_exit (diff)
downloadlinux-0ed7a498f416dcfa1cca478a559238a2a3396240.tar.xz
linux-0ed7a498f416dcfa1cca478a559238a2a3396240.zip
x86_64, dumpstack: move kexec_crash from __die to oops_end
oops_end is preceded by either a call to __die, or a conditional call to crash_kexec. Move the conditional call to crash_kexec from the end of __die to the start of oops_end and remove the superfluous call to crash_kexec in die_nmi. Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/dumpstack_64.c')
-rw-r--r--arch/x86/kernel/dumpstack_64.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index ffefea611ba3..57ce11b895ce 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -458,6 +458,9 @@ unsigned __kprobes long oops_begin(void)
void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
{
+ if (regs && kexec_should_crash(current))
+ crash_kexec(regs);
+
die_owner = -1;
bust_spinlocks(0);
die_nest_count--;
@@ -501,8 +504,6 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
printk(KERN_ALERT "RIP ");
printk_address(regs->ip, 1);
printk(" RSP <%016lx>\n", regs->sp);
- if (kexec_should_crash(current))
- crash_kexec(regs);
return 0;
}
@@ -536,11 +537,9 @@ die_nmi(char *str, struct pt_regs *regs, int do_panic)
printk(" on CPU%d, ip %08lx, registers:\n",
smp_processor_id(), regs->ip);
show_registers(regs);
- if (kexec_should_crash(current))
- crash_kexec(regs);
+ oops_end(flags, regs, 0);
if (do_panic || panic_on_oops)
panic("Non maskable interrupt");
- oops_end(flags, regs, 0);
nmi_exit();
local_irq_enable();
do_exit(SIGBUS);