Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3525317pxf; Mon, 15 Mar 2021 11:29:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1QiaHe9Om5+UwXkEcBu19Vj2KIvSVo9Km+vZspSBry93fOG/+0xMHYddx4DkoMcBfnwH4 X-Received: by 2002:a17:906:3c50:: with SMTP id i16mr25604136ejg.175.1615832993679; Mon, 15 Mar 2021 11:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832993; cv=none; d=google.com; s=arc-20160816; b=nOoiB7oqB8nCm5Zu8qDZt533a1DYxPJmvNf2w2EAuz1d8gAEYniltxQu5OaEMb0USc 3P5qIkd9xCMUl2/2BuhKRL1bAt37P8uQPAnZCZ71+Hv8FmnLR1xZip/FYVjg4+u5z34g XjXYslVuwvZpN/sTTZuSOWN67oXJvW0nQX0yfeU+5ZidFvjuNMobSFrYAHb1lRRaOhDx T0+Z7LGM4HPhspZsGZ9efiJ1RMwnTAXC/EgrtDn9fer5swjIDRMpUvD7Joz+hupbUXO/ 5ewgNSoTi2M7CF0gMkhuFSUkyGfCa53RZ65ypkooWoymr/ZFHEFXoqUp5ZXMvrf9URPw +Nsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=754l01bc6pwiZRngoYoQRbaLtEm/UG4SCSlR7/o6V9s=; b=EvcL8KY5iAA3ClPfIPbQkZgHzv+i1DqhwcWq9ggp5K5PRUrNsRmMkOSM2JmnkFZOp2 uAlV3Wi7G8C1wuI7YXRH2C+oHTf45M8qqVVbxHQiFV9PeHIRt4CcTysb2jOG5djxokpM 4GGiWxzbfwr9wZORFhnXv8MgHuGbloITgByXCL6t69/RV3sZN70Mtq56/LGwudoDjHBi sVtLqnbnU8basd9fk+TLoZM/c05Pa0qQAaqc1YpTcn/3dR053daq88l562q1N+snQPwR Gtp/kl19Ptxn+tZlZpNaJv0mpXFByz/Jp4DtcP+rYiP6eQ0hsS6LF2FVSh86sGizLQQh Pc/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ufj7HvmX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw19si11292866edb.211.2021.03.15.11.29.29; Mon, 15 Mar 2021 11:29:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ufj7HvmX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235099AbhCOObJ (ORCPT + 99 others); Mon, 15 Mar 2021 10:31:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:36764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233127AbhCOOAo (ORCPT ); Mon, 15 Mar 2021 10:00:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E20F664F13; Mon, 15 Mar 2021 14:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816810; bh=6QsA3z8I06ZYH6oCcr108UQjnXDSrmEOYb3taYZi5CA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ufj7HvmXk4hMSkm33uB/508xGOP7oWJBhAa4604M4dSyV8BaWxUpAYEn7n68vT2On ohJ7rAs514f+AlmFq22/x9xAQYa9N/a/NXl52Q087aMSp2qcUHUr3eSm218xLePQFn V/WzmEyaWZK8BL1EgRRbQ7h8A4cDdW3xOGB5oXFA= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Piggin , Michael Ellerman , Sasha Levin Subject: [PATCH 5.11 138/306] powerpc: improve handling of unrecoverable system reset Date: Mon, 15 Mar 2021 14:53:21 +0100 Message-Id: <20210315135512.309857307@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Nicholas Piggin [ 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 Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210130130852.2952424-26-npiggin@gmail.com Signed-off-by: Sasha Levin --- arch/powerpc/kernel/traps.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 3ec7b443fe6b..4be05517f2db 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -503,8 +503,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 (saved_hsrrs) { mtspr(SPRN_HSRR0, hsrr0); -- 2.30.1