[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 11 Nov 2018 16:50:17 +0100
From: LEROY Christophe <christophe.leroy@....fr>
To: Sasha Levin <sashal@...nel.org>
Cc: Michael Ellerman <mpe@...erman.id.au>,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 4.14 05/30] powerpc/traps: restore
recoverability of machine_check interrupts
Looks like this patch didn't make its way into 4.14 yet. Is there a
problem with this patch ?
Christophe
Sasha Levin <sashal@...nel.org> a écrit :
> From: Christophe Leroy <christophe.leroy@....fr>
>
> [ 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@....fr>
> Reviewed-by: Nicholas Piggin <npiggin@...il.com>
> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
> arch/powerpc/kernel/traps.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> index ac2e5e56a9f0..a5f2b7593976 100644
> --- a/arch/powerpc/kernel/traps.c
> +++ b/arch/powerpc/kernel/traps.c
> @@ -694,12 +694,17 @@ void machine_check_exception(struct pt_regs *regs)
> if (check_io_access(regs))
> goto bail;
>
> - die("Machine check", regs, SIGBUS);
> -
> /* 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);
> +
> + return;
> +
> bail:
> if (!nested)
> nmi_exit();
> --
> 2.17.1
Powered by blists - more mailing lists