]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
i386, dumpstack: move crash_kexec before bust_spinlocks(0) in oops_end
authorAlexander van Heukelum <heukelum@fastmail.fm>
Wed, 22 Oct 2008 10:00:08 +0000 (12:00 +0200)
committerIngo Molnar <mingo@elte.hu>
Wed, 22 Oct 2008 12:00:22 +0000 (14:00 +0200)
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>
arch/x86/kernel/dumpstack_32.c

index b3614752197b6c6e3c0cf53c7b718dd0167fbdea..5493d31be4e5a3d73633065b63bc31fd1f2e40e1 100644 (file)
@@ -309,6 +309,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);
+
        bust_spinlocks(0);
        die_owner = -1;
        add_taint(TAINT_DIE);
@@ -318,8 +321,6 @@ void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
        if (!regs)
                return;
 
-       if (kexec_should_crash(current))
-               crash_kexec(regs);
        if (in_interrupt())
                panic("Fatal exception in interrupt");
        if (panic_on_oops)