Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3518322pxf; Mon, 15 Mar 2021 11:19:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGJwStU5jaeYtdLzAXrgHi7vewAYqQNT2Noc2ulO/9rQApy/aXgMs7/9+PrO03t3G6Pw8K X-Received: by 2002:a17:906:4d44:: with SMTP id b4mr25212101ejv.338.1615832381617; Mon, 15 Mar 2021 11:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832381; cv=none; d=google.com; s=arc-20160816; b=pk3kdpIYkTSwXNBzKOffAaM+GwNFsKAhpPV+MfZH77BLswcogHcGdhE/TVzBBNvr7X UDhb406Et7PXc/8HGwmFsAwDCkSYPWyK6z5nZARZ9Jf/KEDO6kJAqanNdXHp9ROoPmLy M7urxptX845D/YnztALfdT6mR1AzYI3Xcamg0w1eso1BdtZyQuamYBMhTO6xuJ24laxf O2Za1evrI5pvdprqZbODCZuxRTFMsx7Skbhg3B2vEtOgC5nk7jVmmP9sMzdXzw+B0p/w ApYrlWAjURsKIT4ezlqpELT0B0FMEPbt0nq1RIh4/ovLo96R025aHwYQgKWKxPC2q2Pv dLlg== 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=9trXJ1i1zJPP15vOfC75tAHqZn91jKMiqNWZm6ngeks=; b=wRiba7L7JHDRJOavzes+rXNUTv5p810AHKy8SJe1p8/F7Io3Ow6Gw2weduCpO4y0cN BsZ5+RwcD4q2/XgEdmX0FLkelYTBizXIsv2VkkMEktnZ4HCs45a3/VKPQVOqysPzyRZS pf27JMjLvaXxTxo6Sg3Ljo3fLRLo4T+J+RU0OzqPTZszySuJeu/mMmD8EAegn5mse3db ZoQ90rx5oEsIBvKx8eEtD/XHhdmBPwsllm5dwiFlqgFuYdNfVh8LcvXR+LJc862Q8Kin paicjDAF6JG+FkQWP+0Py3/Rw8Qw6aHunqQUTz4TsdMpsfP3pGVPdzRDsyz1+X6CvCDJ M4jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PNbv31vb; 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 z1si12249239edc.76.2021.03.15.11.19.19; Mon, 15 Mar 2021 11:19:41 -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=PNbv31vb; 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 S232459AbhCOOSE (ORCPT + 99 others); Mon, 15 Mar 2021 10:18:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:36594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232718AbhCON7g (ORCPT ); Mon, 15 Mar 2021 09:59:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AE99064F73; Mon, 15 Mar 2021 13:59:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816754; bh=xoQR4W2eLoVMf5THu+qO2cIW0s+W03v4FSCbI0tO2nk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PNbv31vbsA2MIPkDEjs3nVATRbjvI8veuhYoPTKRVqKGXfaxD2wqPv7rCda8P0SPf JIUSD7N+IEUJeq69Ygf83EZUSYRpgF2yiWS63N4ONVrkEALsQBpp9rXcrq4V1bevyf I9+OpiZWm4u6VUdbqpGxTUg+rL02k4fY0z2PKMUU= 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 4.19 047/120] powerpc: improve handling of unrecoverable system reset Date: Mon, 15 Mar 2021 14:56:38 +0100 Message-Id: <20210315135721.528845841@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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 1b2d84cb373b..2379c4bf3979 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -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(); -- 2.30.1