Commit 6f44b20e authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc: Fix graceful debugger recovery

When exiting xmon with 'x' (exit and recover), oops_begin bails
out immediately, but die then calls __die() and oops_end(), which
cause a lot of bad things to happen.

If the debugger was attached then went to graceful recovery, exit
from die() immediately.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 43c9127d
...@@ -122,9 +122,6 @@ static unsigned long oops_begin(struct pt_regs *regs) ...@@ -122,9 +122,6 @@ static unsigned long oops_begin(struct pt_regs *regs)
int cpu; int cpu;
unsigned long flags; unsigned long flags;
if (debugger(regs))
return 1;
oops_enter(); oops_enter();
/* racy, but better than risking deadlock. */ /* racy, but better than risking deadlock. */
...@@ -227,8 +224,12 @@ NOKPROBE_SYMBOL(__die); ...@@ -227,8 +224,12 @@ NOKPROBE_SYMBOL(__die);
void die(const char *str, struct pt_regs *regs, long err) void die(const char *str, struct pt_regs *regs, long err)
{ {
unsigned long flags = oops_begin(regs); unsigned long flags;
if (debugger(regs))
return;
flags = oops_begin(regs);
if (__die(str, regs, err)) if (__die(str, regs, err))
err = 0; err = 0;
oops_end(flags, regs, err); oops_end(flags, regs, err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment