]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/traps: restore recoverability of machine_check interrupts
authorChristophe Leroy <christophe.leroy@c-s.fr>
Sat, 13 Oct 2018 09:16:22 +0000 (09:16 +0000)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:58:35 +0000 (19:58 -0600)
commit8084555b0e933ef96ed216d079e9d46b2856f7e6
tree22bd994d9bdb483131171aaf7eac2ef554d5c598
parent4acc0c9a8c829d6f25a754fd1b962d54ad19c928
powerpc/traps: restore recoverability of machine_check interrupts

BugLink: https://bugs.launchpad.net/bugs/1836802
[ Upstream commit daf00ae71dad8aa05965713c62558aeebf2df48e ]

commit b96672dd840f ("powerpc: Machine check interrupt is a non-
maskable interrupt") added a call to nmi_enter() at the beginning of
machine check restart exception handler. Due to that, in_interrupt()
always returns true regardless of the state before entering the
exception, and die() panics even when the system was not already in
interrupt.

This patch calls nmi_exit() before calling die() in order to restore
the interrupt state we had before calling nmi_enter()

Fixes: b96672dd840f ("powerpc: Machine check interrupt is a non-maskable interrupt")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/powerpc/kernel/traps.c