Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b960e8dc authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Greg Kroah-Hartman
Browse files

powerpc: improve handling of unrecoverable system reset



[ 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: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210130130852.2952424-26-npiggin@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2f43ab96
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -433,8 +433,11 @@ void system_reset_exception(struct pt_regs *regs)
		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 (!nested)
		nmi_exit();