]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/64s: sreset panic if there is no debugger or crash dump handlers
authorNicholas Piggin <npiggin@gmail.com>
Mon, 30 Apr 2018 16:57:00 +0000 (18:57 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 May 2018 09:00:35 +0000 (11:00 +0200)
commit1be6702ef8b0a8e47ff1e9d3097f4a041e02e87b
tree0cdc17a0f0ac29fa7ade466c330c921daf912312
parent0e789d96c46f8efd68526f0b4cda9446ca6128b3
powerpc/64s: sreset panic if there is no debugger or crash dump handlers

BugLink: http://bugs.launchpad.net/bugs/1767927
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>
(cherry-picked from d40b6768e45bd9213139b2d91d30c7692b6007b1)
Signed-off-by: Gustavo Walbon <gwalbon@linux.vnet.ibm.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/powerpc/kernel/traps.c