Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3524205pxf; Mon, 15 Mar 2021 11:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR6m3ZjDC4cyBZd5YGtBpf1GDZCJ2QPuVOBCgLJiNl+GdcBWl1jqhmvRIEg5ciMe/q1YMV X-Received: by 2002:a17:906:f2d2:: with SMTP id gz18mr24997157ejb.454.1615832902724; Mon, 15 Mar 2021 11:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832902; cv=none; d=google.com; s=arc-20160816; b=trnufOT5bGzuUABpkqjnXtWv4wFrIX+aA3RWLUVi2XOw8/qdZve3NVg+6/ghvNV7V9 1XED6Tbhrsykzc3eRDaS/eQRm6N33CNZqWYls2HuqeuixDU6oZIaQ6yodhVqN71EMZSl aXSnu2+xOc/uueRSjJs41p+emgXMMXV9ivPgaJ0Ce5MxWXCn9Lx9NQ3uFxotDgmSR8C+ ZswTQTR9It8LC43XjgqcVqRISzfWvJfj2pUltNy/io27zLAx7Tc7Jv2jyDAN0rI69IUQ idavLW1iu/yM3f/t99oTAxApYS0qUvXKskP5pcJq0JLrlcL7ircxYvYXtQDE3R/WYZjk aa1w== 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=f8eb+FlPZlHrhu8YMGYPRg3zLuJe310Wi7bRQ3n84p0=; b=LB9pjMF9zKMKfWWMPqyh1aoTijfDYPQgNrvtyiAx9ibzkJiI9cLaq3A4XmL4s8N9zV zyJ7vZB9Lhz4DVad31WnDHFlKiwd3POCeEmYJODykHb5sqlEHcoRBqqw+DX9gkkUrRrv xxrCZbMjUCAfpjOJ5luunaG7v6fRFDE46YdYhb4v+pdLsYmacLM7FqJaVhU4bDu6NRbt lJC+7ToglUWKb0Myb8IkVLcxB6qh/gVBDlyoNlx7quG2sVfNF9+ZuN3+Uboji8gA8uSJ ODuAcZ3gquxUEB1kF9U77FNOAKUXKmLpqL9cbnAGuVfSzBpE0PG71L/2Hj0kssDtNoxP uw6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tCzqEEBh; 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 b59si9767485edf.40.2021.03.15.11.27.54; Mon, 15 Mar 2021 11:28:22 -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=tCzqEEBh; 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 S230423AbhCOObU (ORCPT + 99 others); Mon, 15 Mar 2021 10:31:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231907AbhCOOBK (ORCPT ); Mon, 15 Mar 2021 10:01:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9F83E64F16; Mon, 15 Mar 2021 14:00:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816836; bh=ffHiKX2x359sykKVshemZJfSIe3BzHOOXXmMQABK2nQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tCzqEEBh8a4KPvfv5hWjTaB3Mwzijs1xvrj9v56VfODcuNb+1i9R2v5oGumrP0BHO EgXR0uGDzIdnGoMoUAwFTUzXksmlmiWzi7pvkhJkh1fC1GjSPu+EjhWxLM5UapXUWg QLgzaTvQvMh/5BRAsYLIJyEtK7wM5Sw5l5hDrtkc= 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.10 142/290] powerpc: improve handling of unrecoverable system reset Date: Mon, 15 Mar 2021 14:53:55 +0100 Message-Id: <20210315135546.711852192@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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 5006dcbe1d9f..77dffea3d537 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -509,8 +509,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