Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3110227imu; Sun, 11 Nov 2018 07:51:11 -0800 (PST) X-Google-Smtp-Source: AJdET5f2KvjbYGqzhAdi0fkgnZnPwWETZHIXHdUMyTbApn4ACydyWl/gos6PU0RnFBa9aKjvlooJ X-Received: by 2002:a17:902:9a47:: with SMTP id x7-v6mr16672232plv.316.1541951471379; Sun, 11 Nov 2018 07:51:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541951471; cv=none; d=google.com; s=arc-20160816; b=Mm/wt+4Zeup2k9m7Cs/LahovNY/bj0hprD2JLB9f346ly6erX9RDEGXIXWl5gO4Eqm 9UsVyBjlbY+LtH3ONk7qCuRseu4uXLehfM5JkSdmlh+j4bin50DNJfK6rAHj0goKLtSp 68/ow7CCNNS6TiNfDobnCkOuURvQvR/23fpqMnnd8x8LxdDVkzEPiFWJYTX9fKianMna t0fKPkhbZk8fdp+d8iN2oLwHtDa/esCuFseAviTURW8tEkxpTktiCOg9paH1TLr030E0 81hCQeOVfa1RPr8CpuH7iWSYRjjADF005Ewfezx6b3JS7o3hhW/ldRZvax7Bt/BWY4X5 6s4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-disposition:mime-version:user-agent:in-reply-to:references :subject:cc:to:from:message-id:date; bh=XEXj6HB+tikKdCM2P7q25bycRDSJ67V8Srfdjhu3XHs=; b=i/j/dNOZw3M3eK6/hWEpajLnkaRS33zz1lKCKCuZrMw5MT/zWKhuGSE8ZldGCLP/5B szggre0UFxV3N2df+infavVq0s+6ms9IGQSmXeY9+yEpSWDm2iQIzRfbth/p6HciCZaV CZgK15ge15StS08AWKdyeQrl95ezGhMV/QPjjP9w3OXfHN09ruAquHXsi5fYXNumIoUT sKt06rkldyWo0m8CvYQ0npKvCOwcKnq85Jl+4b3mdtQbhN6UyUWlOFXnfq0JUrHSt3jQ R9IwOlRf9JvJECgrPUGdaCP3MOYNtIQVFYGXCXI+vh87wQlIs6/mFpxjKkBEKHIPklIV yXhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2-v6si14757877plq.268.2018.11.11.07.50.53; Sun, 11 Nov 2018 07:51:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728767AbeKLBjZ convert rfc822-to-8bit (ORCPT + 99 others); Sun, 11 Nov 2018 20:39:25 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:8806 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728708AbeKLBjZ (ORCPT ); Sun, 11 Nov 2018 20:39:25 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 42tJHx3n7bz9v0qx; Sun, 11 Nov 2018 16:50:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id B4aG1vEPXBHF; Sun, 11 Nov 2018 16:50:21 +0100 (CET) Received: from vm-hermes.si.c-s.fr (vm-hermes.si.c-s.fr [192.168.25.253]) by pegase1.c-s.fr (Postfix) with ESMTP id 42tJHx302Mz9v0qZ; Sun, 11 Nov 2018 16:50:21 +0100 (CET) Received: by vm-hermes.si.c-s.fr (Postfix, from userid 33) id 7F48963E; Sun, 11 Nov 2018 16:50:17 +0100 (CET) Received: from lim91-2-88-180-148-239.fbx.proxad.net (lim91-2-88-180-148-239.fbx.proxad.net [88.180.148.239]) by messagerie.si.c-s.fr (Horde Framework) with HTTP; Sun, 11 Nov 2018 16:50:17 +0100 Date: Sun, 11 Nov 2018 16:50:17 +0100 Message-ID: <20181111165017.Horde.p-JAEzMAEZNYBCQTqILU4A1@messagerie.si.c-s.fr> From: LEROY Christophe To: Sasha Levin Cc: Michael Ellerman , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH AUTOSEL 4.14 05/30] powerpc/traps: restore recoverability of machine_check interrupts References: <20181104135325.88524-1-sashal@kernel.org> <20181104135325.88524-5-sashal@kernel.org> In-Reply-To: <20181104135325.88524-5-sashal@kernel.org> User-Agent: Internet Messaging Program (IMP) H5 (6.2.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Looks like this patch didn't make its way into 4.14 yet. Is there a problem with this patch ? Christophe Sasha Levin a écrit : > From: Christophe Leroy > > [ 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 > Reviewed-by: Nicholas Piggin > Signed-off-by: Michael Ellerman > Signed-off-by: Sasha Levin > --- > 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