Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3516131pxf; Mon, 15 Mar 2021 11:16:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH7K64pbVh4a6fJq6RRJOmJGrkuXIQLfczN4ogBEPCsZv7PuTDkBnWrVCMZ6owLW/PqKRq X-Received: by 2002:a17:906:ecfb:: with SMTP id qt27mr24758830ejb.245.1615832176524; Mon, 15 Mar 2021 11:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832176; cv=none; d=google.com; s=arc-20160816; b=PfuhPm9CD+Y5cNwHqt41jN9c49hDiIdMSs4TPtg3Xw6muLoLEkNuXVLTB470nvkbll 0dgkxY7Egp9qFHV9wRIaeMIj17uT4L+epUEdukC3G66ilZ8XSajtKdyXBq6czyXeRP8B EHrWrHCXTY/t2x4q2I2dqZhIt4YlTC4T9CeuEsvxE2oFQAWlableh8bjn3WfIzYXRMn0 t/7RqNxHprWIsCTu+I4XEyPs7vcxkCTQ8LG6y1Is/dcGkjZm3uYzEcuU4sk+CxDKECU6 oR7hfEs1xGADDlb7LPJAZX4oj8IUPpWSL1RdOXHLTXVaNGb60LxJtH8VYKJhoIh/Q2nl EVQg== 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=Dq3SZlP0quLHj6jP/ylhKWdRi9cVPzWHX1Dt8Pha2WI=; b=WSzCm6gL5ykp7Reo4x6fTfgHYb40aVo8N71FMKNKy60Tv4zmcwISs3LD1NXw6unKKy 1VzmW3MElk19PGh4DrfMey9EBX31kkV0Kpmi0HNztqwZ7RosZPWdX1xNKMPQzQYxZm9x JgqI8wIzDVUuL1gNI9h6i1t/e2r1E4KsUx2JcHXV/kkDIzpOLveqyZxHNV+P6PxSPeIV 2b+mHDtzriIgpXu0C9OmlvGpN8YP1M/9IOFi0vI7Ggn5IO2uuQXkXT8kmIXzxoDdovxl nlgvR5JtFBu8rxQa3L12cYGABwB5thQeetJhw7j6iHykfpkQU4hhGDXQ0Q3a9gp9XaPL m/AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b8nv9JGl; 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 g3si11509769edp.527.2021.03.15.11.15.53; Mon, 15 Mar 2021 11:16:16 -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=b8nv9JGl; 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 S236779AbhCOOPY (ORCPT + 99 others); Mon, 15 Mar 2021 10:15:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:37476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231848AbhCON7L (ORCPT ); Mon, 15 Mar 2021 09:59:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 506F664F17; Mon, 15 Mar 2021 13:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816726; bh=8HhfHqUUURTJVwaees13/7FQhZEVv5SjzV+S9H2thyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b8nv9JGlP6raZprlKckkVcTG/x9fnfR3wz+Pqpl9Ti3SZQ0GLEKOPmfqMSId26ZHA kprYf4d97DqP41C5ec5m2ABp4cAI8tlH0ryFI6Dz82sBM0ief5EZ8ICrdoglwBSp5J JvGQpSXETkgLPTq0Q7CGjMiilDwwP+CInz7LOav4= 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.4 070/168] powerpc: improve handling of unrecoverable system reset Date: Mon, 15 Mar 2021 14:55:02 +0100 Message-Id: <20210315135552.671229512@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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 206032c9b545..ecfa460f66d1 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -513,8 +513,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