From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796384861; b=35Lh2p8876MkBMFQaNQ5OkFaK9Hm/jLuI/M7gDCBTnUjeqyoNSvW39ahQpzOlrnFIcd5 nMBn4BDQQCWLIRHSOqjRSvgfFD88Wq778OGUGq6sIXXkxTFO/1mAieyaPofJrcvuj4q03 2aaYZXRVuCt37aYxP6BoEdO0NiexXBcmHeR3FYJQfwuf7tlK7mSFoqTGTRZZVOSMhVNYp Kbeb3sFRtmG68bcJ1VVdM8QsFNufN95dLxAbgQAYAgpcrlRLzb4mQC5yVXUOdO1j16n52 axuJH1fXcxJcdQCW+mkTCErbAa/50L2UexYMdxcr356tIuzXtNhjg8Zr+UoZS4f4Uvg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384861; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=IWF/9rIJb2PGX2y2OTBfCuHgkCPUTJ1vRpnx9aNHzwE=; b=vfj7lV06KjzfaF1vd9HgxVm/f6+PgjmaAkNmG5AXuwVLwWP1XFPcYrff5RgDS85wm43J o/2JroJ8dhCBH0CW0RpOTUmwANM2B3EjB5jAk/0Y1F8oElYymA5ReN9ERsgS95wrZ6xWK O/NksYy9LS1eOlmenN1mn92h3vZyLYBq3e04I8n5w5eS11DTMLCHKtYdc9xfQQygraEKl ka+Ftl2NI7WOpEAa4102FRQH+iqICdbs4CcJsldUG625g9/CnOK8y1tkv6Q9nTiilysLk edIUmXWX68RaoUDpsdlxggMxfCelnOKz6nzCZKl/gwjXpFV/aCiVYqyU5Y8MPl0jwdA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=RMM80GEx; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 790F5606A322; Fri, 4 Dec 2026 11:47:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=RMM80GEx Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C2C71F00931; Fri, 4 Dec 2026 11:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384861; bh=IWF/9rIJb2PGX2y2OTBfCuHgkCPUTJ1vRpnx9aNHzwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RMM80GExgVQ690yvSX1PLEKk/Iqz2NdDE/0gG+OV/npa4sIfVCBo6pxnmCvGv6ANS 7kUyS8WCqcdeOPuSx29Elo8LN0QF4TuHgp5rFHHJl7ftHJOEgVTSOD7kBu3H/SXMyi CyfNKL8fnt9IbAatWc0XjwQBllya+wYf662ara1s= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bradley Morgan , Andrew Morton , Petr Mladek , Guenetr Roeck , Sashiko , Wang Jinchao , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 6.6 0284/1167] panic: flatten nmi_panic control flow Date: Fri, 4 Dec 2026 18:55:11 +0900 Message-ID: <20261204100709.441013930@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bradley Morgan [ Upstream commit 75eb687ff2bcec9fba31bbe266e5f91e5c283efe ] panic() is __noreturn, so the else after panic_try_start() is dead. Drop it so the force_cpu path can be added cleanly on top. Link: https://lore.kernel.org/20260916182957.7788-3-brads@mainlining.org Signed-off-by: Bradley Morgan Signed-off-by: Andrew Morton Reviewed-by: Petr Mladek Cc: Guenetr Roeck Cc: Sashiko Cc: Wang Jinchao Cc: Wim Van Sebroeck Cc: [ sashal: Replaced the missing panic_try_start() and panic_on_other_cpu() helpers with the open-coded old_cpu == PANIC_CPU_INVALID and old_cpu != cpu checks when removing the else. ] Signed-off-by: Sasha Levin --- kernel/panic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/panic.c b/kernel/panic.c index d7973e9754748..3698d2f8c925e 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -199,7 +199,8 @@ void nmi_panic(struct pt_regs *regs, const char *msg) if (old_cpu == PANIC_CPU_INVALID) panic("%s", msg); - else if (old_cpu != cpu) + + if (old_cpu != cpu) nmi_panic_self_stop(regs); } EXPORT_SYMBOL(nmi_panic); -- 2.53.0