Skip to content

Commit

Permalink
powerpc/traps: fix recoverability of machine check handling on book3s/32
Browse files Browse the repository at this point in the history
commit 0bbea75 upstream.

Looks like book3s/32 doesn't set RI on machine check, so
checking RI before calling die() will always be fatal
allthought this is not an issue in most cases.

Fixes: b96672d ("powerpc: Machine check interrupt is a non-maskable interrupt")
Fixes: daf00ae ("powerpc/traps: restore recoverability of machine_check interrupts")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
chleroy authored and gregkh committed Mar 23, 2019
1 parent a22b34c commit bfb576f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,15 +694,15 @@ void machine_check_exception(struct pt_regs *regs)
if (check_io_access(regs))
goto bail;

/* Must die if the interrupt is not recoverable */
if (!(regs->msr & MSR_RI))
nmi_panic(regs, "Unrecoverable Machine check");

if (!nested)
nmi_exit();

die("Machine check", regs, SIGBUS);

/* Must die if the interrupt is not recoverable */
if (!(regs->msr & MSR_RI))
nmi_panic(regs, "Unrecoverable Machine check");

return;

bail:
Expand Down

0 comments on commit bfb576f

Please sign in to comment.