]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s: sreset panic if there is no debugger or crash dump handlers
authorNicholas Piggin <npiggin@gmail.com>
Mon, 26 Mar 2018 15:01:16 +0000 (01:01 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 31 Mar 2018 13:47:46 +0000 (00:47 +1100)
commit5cc5445daada962eba04bfa86d6a4f0c26ba9050
tree9701df864068dae6daeab2dcc49dd67c15533dbd
parent72b90b9f19cb1796676aadaa4801146f15864742
powerpc/64s: sreset panic if there is no debugger or crash dump handlers

system_reset_exception does most of its own crash handling now,
invoking the debugger or crash dumps if they are registered. If not,
then it goes through to die() to print stack traces, and then is
supposed to panic (according to comments).

However after die() prints oopses, it does its own handling which
doesn't allow system_reset_exception to panic (e.g., it may just
kill the current process). This patch causes sreset exceptions to
return from die after it prints messages but before acting.

This also stops die from invoking the debugger on 0x100 crashes.
system_reset_exception similarly calls the debugger. It had been
thought this was harmless (because if the debugger was disabled,
neither call would fire, and if it was enabled the first call
would return). However in some cases like xmon 'X' command, the
debugger returns 0, which currently causes it to be entered
again (first in system_reset_exception, then in die), which is
confusing.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/traps.c