]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
powerpc/traps: Make unrecoverable NMIs die instead of panic
authorNicholas Piggin <npiggin@gmail.com>
Fri, 8 May 2020 04:34:07 +0000 (14:34 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 11:14:44 +0000 (13:14 +0200)
[ Upstream commit 265d6e588d87194c2fe2d6c240247f0264e0c19b ]

System Reset and Machine Check interrupts that are not recoverable due
to being nested or interrupting when RI=0 currently panic. This is not
necessary, and can often just kill the current context and recover.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Link: https://lore.kernel.org/r/20200508043408.886394-16-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/traps.c

index d5f351f02c1534847925bdf50db3b9489456d67a..7781f0168ce8c75c59168a4467b882e8a0dd1b9e 100644 (file)
@@ -430,11 +430,11 @@ out:
 #ifdef CONFIG_PPC_BOOK3S_64
        BUG_ON(get_paca()->in_nmi == 0);
        if (get_paca()->in_nmi > 1)
-               nmi_panic(regs, "Unrecoverable nested System Reset");
+               die("Unrecoverable nested System Reset", regs, SIGABRT);
 #endif
        /* Must die if the interrupt is not recoverable */
        if (!(regs->msr & MSR_RI))
-               nmi_panic(regs, "Unrecoverable System Reset");
+               die("Unrecoverable System Reset", regs, SIGABRT);
 
        if (!nested)
                nmi_exit();
@@ -775,7 +775,7 @@ void machine_check_exception(struct pt_regs *regs)
 
        /* Must die if the interrupt is not recoverable */
        if (!(regs->msr & MSR_RI))
-               nmi_panic(regs, "Unrecoverable Machine check");
+               die("Unrecoverable Machine check", regs, SIGBUS);
 
        return;