Skip to content

Commit

Permalink
i386, dumpstack: move crash_kexec before bust_spinlocks(0) in oops_end
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: "Neil Horman" <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
heukelum authored and Ingo Molnar committed Oct 22, 2008
1 parent cf52ebe commit b4b8f87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/kernel/dumpstack_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit b4b8f87

Please sign in to comment.