aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/dumpstack_32.c
diff options
context:
space:
mode:
authorAlexander van Heukelum <heukelum@fastmail.fm>2008-10-22 06:00:08 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-22 08:00:22 -0400
commitb4b8f87bf4958cbad620654efc0882ac46c19846 (patch)
treeac94939d6bc8e75e212225da99ccbf8a48e7c30e /arch/x86/kernel/dumpstack_32.c
parentcf52ebedba77ee494b495dedd3a1f55944611275 (diff)
i386, dumpstack: move crash_kexec before bust_spinlocks(0) in oops_end
crash_kexec should not be called with console_sem held. Move the call before bust_spinlocks(0) in oops_end to avoid the problem. 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_32.c')
-rw-r--r--arch/x86/kernel/dumpstack_32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
index b3614752197b..5493d31be4e5 100644
--- a/arch/x86/kernel/dumpstack_32.c
+++ b/arch/x86/kernel/dumpstack_32.c
@@ -309,6 +309,9 @@ unsigned __kprobes long oops_begin(void)
309 309
310void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) 310void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
311{ 311{
312 if (regs && kexec_should_crash(current))
313 crash_kexec(regs);
314
312 bust_spinlocks(0); 315 bust_spinlocks(0);
313 die_owner = -1; 316 die_owner = -1;
314 add_taint(TAINT_DIE); 317 add_taint(TAINT_DIE);
@@ -318,8 +321,6 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
318 if (!regs) 321 if (!regs)
319 return; 322 return;
320 323
321 if (kexec_should_crash(current))
322 crash_kexec(regs);
323 if (in_interrupt()) 324 if (in_interrupt())
324 panic("Fatal exception in interrupt"); 325 panic("Fatal exception in interrupt");
325 if (panic_on_oops) 326 if (panic_on_oops)