]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
powerpc: improve handling of unrecoverable system reset
authorNicholas Piggin <npiggin@gmail.com>
Sat, 30 Jan 2021 13:08:35 +0000 (23:08 +1000)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:39:52 +0000 (13:39 -0500)
BugLink: https://bugs.launchpad.net/bugs/1919492
[ Upstream commit 11cb0a25f71818ca7ab4856548ecfd83c169aa4d ]

If an unrecoverable system reset hits in process context, the system
does not have to panic. Similar to machine check, call nmi_exit()
before die().

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-26-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/kernel/traps.c

index 3ec7b443fe6bbabdc511ac8c8773dbb40774600b..4be05517f2db83f79ceb86f02c0db8237eb94536 100644 (file)
@@ -503,8 +503,11 @@ out:
                die("Unrecoverable nested System Reset", regs, SIGABRT);
 #endif
        /* Must die if the interrupt is not recoverable */
-       if (!(regs->msr & MSR_RI))
+       if (!(regs->msr & MSR_RI)) {
+               /* For the reason explained in die_mce, nmi_exit before die */
+               nmi_exit();
                die("Unrecoverable System Reset", regs, SIGABRT);
+       }
 
        if (saved_hsrrs) {
                mtspr(SPRN_HSRR0, hsrr0);