diff options
author | Alexander van Heukelum <heukelum@fastmail.fm> | 2008-10-22 06:00:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-22 08:00:23 -0400 |
commit | 0ed7a498f416dcfa1cca478a559238a2a3396240 (patch) | |
tree | 77e82cde06f9768e38fe047159ca7d4f9d7110a5 /arch/x86/kernel/dumpstack_64.c | |
parent | 874d93d11823b2b861addac6a5dc31162e924ab2 (diff) |
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.c | 9 |
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) | |||
458 | 458 | ||
459 | void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) | 459 | void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) |
460 | { | 460 | { |
461 | if (regs && kexec_should_crash(current)) | ||
462 | crash_kexec(regs); | ||
463 | |||
461 | die_owner = -1; | 464 | die_owner = -1; |
462 | bust_spinlocks(0); | 465 | bust_spinlocks(0); |
463 | die_nest_count--; | 466 | die_nest_count--; |
@@ -501,8 +504,6 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err) | |||
501 | printk(KERN_ALERT "RIP "); | 504 | printk(KERN_ALERT "RIP "); |
502 | printk_address(regs->ip, 1); | 505 | printk_address(regs->ip, 1); |
503 | printk(" RSP <%016lx>\n", regs->sp); | 506 | printk(" RSP <%016lx>\n", regs->sp); |
504 | if (kexec_should_crash(current)) | ||
505 | crash_kexec(regs); | ||
506 | return 0; | 507 | return 0; |
507 | } | 508 | } |
508 | 509 | ||
@@ -536,11 +537,9 @@ die_nmi(char *str, struct pt_regs *regs, int do_panic) | |||
536 | printk(" on CPU%d, ip %08lx, registers:\n", | 537 | printk(" on CPU%d, ip %08lx, registers:\n", |
537 | smp_processor_id(), regs->ip); | 538 | smp_processor_id(), regs->ip); |
538 | show_registers(regs); | 539 | show_registers(regs); |
539 | if (kexec_should_crash(current)) | 540 | oops_end(flags, regs, 0); |
540 | crash_kexec(regs); | ||
541 | if (do_panic || panic_on_oops) | 541 | if (do_panic || panic_on_oops) |
542 | panic("Non maskable interrupt"); | 542 | panic("Non maskable interrupt"); |
543 | oops_end(flags, regs, 0); | ||
544 | nmi_exit(); | 543 | nmi_exit(); |
545 | local_irq_enable(); | 544 | local_irq_enable(); |
546 | do_exit(SIGBUS); | 545 | do_exit(SIGBUS); |