🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #18792

[PATCH printk v3 7/7] netconsole: Perform unsafe flushing on panic and emergency restart

#18792
From: John Ogness
Date: Wed, 18 Nov 2026 23:03
38 lines
11023 bytes
As a legacy console the netconsole would perform unsafe flushing
during panic and emergency restart. With commit 7eab73b18630
("netconsole: convert to NBCON console infrastructure") the netconsole
is now an NBCON console, however it uses the CON_NBCON_ATOMIC_UNSAFE
flag and this prevents unsafe flushing except for at the very end of
panic().

Enable default unsafe flushing policies to allow the netconsole to
perform unsafe flushing during panic and emergency restart.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
 drivers/net/netconsole.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 267254f046de9..3300b2bbbd413 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -2695,6 +2695,7 @@ static void free_param_target(struct netconsole_target *nt)
 static struct console netconsole_ext = {
 	.name = "netcon_ext",
 	.flags = CON_ENABLED | CON_EXTENDED | CON_NBCON | CON_NBCON_ATOMIC_UNSAFE,
+	.allow_unsafe_policy = NBCON_PANIC_RESTART_FLUSH | NBCON_EMERGENCY_RESTART_FLUSH,
 	.write_thread = netconsole_write_ext,
 	.write_atomic = netconsole_write_ext,
 	.device_lock = netconsole_device_lock,
@@ -2704,6 +2705,7 @@ static struct console netconsole_ext = {
 static struct console netconsole = {
 	.name = "netcon",
 	.flags = CON_ENABLED | CON_NBCON | CON_NBCON_ATOMIC_UNSAFE,
+	.allow_unsafe_policy = NBCON_PANIC_RESTART_FLUSH | NBCON_EMERGENCY_RESTART_FLUSH,
 	.write_thread = netconsole_write_basic,
 	.write_atomic = netconsole_write_basic,
 	.device_lock = netconsole_device_lock,
-- 
2.47.3
Technical Details
Message-ID: <20261118230345.808560-8-john.ogness@linutronix.de>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366495-linux-kernel-netdev=dewy.ru
References: <20261118230345.808560-1-john.ogness@linutronix.de>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366495-linux-kernel-netdev=dewy.ru
From: john.ogness@linutronix.de (John Ogness)
Newsgroups: linux.kernel.netdev
Subject: [PATCH printk v3 7/7] netconsole: Perform unsafe flushing on panic and emergency restart
Date: Thu, 19 Nov 2026 00:09:43 +0106
Organization: Usenet Network
Message-ID: <20261118230345.808560-8-john.ogness@linutronix.de>
References: <20261118230345.808560-1-john.ogness@linutronix.de>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2723609"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Afq0F6hH1iCa/u9CYvHSKZf1wac= sha256:8JwhorsMxvp1bMhixzelqrPmeiQOSQBfw3mckH5CgTQ=
	sha1:nM5nk0VxRgFtjKpa7c6nYlxW3zU= sha256:uXnB3xadKO8XZoKu05XqWO08LiyVYi0d9JqEPac8tXA=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id BA56111540A; Thu, 19 Nov 2026 02:05:18 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.419
X-Spam-Status: No, score=-2.419 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	INVALID_DATE_TZ_ABSURD=0.632, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=linutronix.de header.b=RQbWaqGC; dkim=neutral
	reason="invalid (unsupported algorithm ed25519-sha256)"
	header.d=linutronix.de header.b=dgZrJwWE
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id ZbPdMYJwuAvI;
	Thu, 19 Nov 2026 02:05:13 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-366495-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linutronix.de
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 0CA9C115404; Thu, 19 Nov 2026 02:04:56 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id B2D381851CB; Wed, 18 Nov 2026 23:04:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795043038;
	b=HDAGVgfrJU3FLhTlR8X9bEOZ0DnaZMmTubj/92worRhXtgzqn+tMCW7WJlUisW+MjTrC
	 PKQC+S4/U8cc/0yHBzosoCxP87+qVs0nWGjPo+V2tS7xuL2M2c+iFa2vyVotzWGhy5Idc
	 tMxF2Z+RfudjYg4XGmmSE+O9KN8C7d8mFmvmKYm1fJGhPkcMwy80pYilOxQaBsd/lYT72
	 TGsdAeGXCGvrLcCYmi6sLp548FX9U/E4hZq9ZVNO0IZDIVGvS+CUCrb3q8TpdNKGuFQlu
	 5bsv1ja4lF/MVz2fE+4H/aqcrM//8iPF2PFmUzhyTEt3NyJdfnzc/1NE5B6w5NVhJtw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795043038;
	h=X-Original-To:Received:DMARC-Filter:From:DKIM-Signature:
	 DKIM-Signature:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=EDQ/Bv0EKc6YV/NWFzsUR1sguRZd0XohMFdCN/XmTyg=;
	b=zXl7WqeEpsxfdWT4Qnw2HxobxplLfFfP3L1bW+W/FuwfhRZyJN946x/Qda7INsO+1qTc
	 Ty1oLj1OtqPqwp3vTdFtAJcSTR/oBejGpzolv3JTzDaT5sBPiN/yfC18CzajvfHBKcYQ0
	 ImNlDxS60Eyq/vKm3H0mjj2AaRUf9lIo+w9qme3+cH4URy1D9VBlb/nOznk3gp0sz9ase
	 QCb3NqNSr0Yg5EDwANAD/50nhIDIPvRJYu4AUbzzVQk5ExVvV3AZnhgP1cWWrdR1MRyeP
	 nWibdn9dZ9UWIpcUF6hhSentFBozb6F4+PFzi1PCmK4kn9AWFg8p4CyqZoHdSWcG4OA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=RQbWaqGC;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=dgZrJwWE;
	dmarc=pass header.from=linutronix.de;
	spf=pass smtp.mailfrom=linutronix.de;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 394B960A2623;
	Wed, 18 Nov 2026 23:03:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=RQbWaqGC;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=dgZrJwWE
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795043032;
	b=VhPufAoXhxmtCik96muIVBQxl8l3nEjkzgWso5Z6/F5VPV7OV9ezoRHbHKhJQ1rnD2el
	 o0K8PXTgl+lWt1xk6BDfRVcg48vxP/V5haEFADJSDyf/6Z2KLPAH33yhqfkQH1do8g7cG
	 8BXQJyQEPNiekAOqxq1X2hzBjMdX0eb0iX9Fy+yZH37FVI72eZ5S8XmJjBCFjjo5RtGGq
	 iWcJ/c+YQ7L2rZea38hZTTatNi1TVU6OWfJPwTDmRiEpgYOYb7o3T2GG3kFIg4ouKajIY
	 GisWSigrwplv8huWJ02AhmF2Zuk0RE2NVwgWnkmukOMbN2eAqc9Ltu/c+MQVN5aEa2Q==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795043032;
	h=DMARC-Filter:From:DKIM-Signature:DKIM-Signature:To:Cc:Subject:Date:
	 Message-ID:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=EDQ/Bv0EKc6YV/NWFzsUR1sguRZd0XohMFdCN/XmTyg=;
	b=SmZRJhS3FzOCBSw/5UMWqe177HBACyaDY4EDxuI4qYbYvDpyfsZDoli4ZoVKjlg0DKQG
	 igKfhQx9dfU/+Y97Cf1nokdCDUrTUm5EyTnwFFo3Q0fYAdA0jxigWri62IpCSJH0seb43
	 sEr0gMrLRPdTyJKdrLtxiWSyxB0FFVl70NGmzrLB/kQofNGAkGgbp5fdv4aegRVf+LjVq
	 +x7DtnCXzcO3u7tXHwP0tHR3M4UnVS0RPPnrlByoVrmdZCGTA92wqA3an3PYP1qY9pMRL
	 DEYDoOKH++JaKrPFOa0E6aMrSdHdZO/b6Wyrx6gavGZHhUhMqlru9mFBWD/ByrwyOng==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linutronix.de;
	spf=pass smtp.mailfrom=linutronix.de;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=RQbWaqGC;
	dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=dgZrJwWE;
	arc=none smtp.remote-ip=193.142.43.55
X-Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA7E160A2631;
	Wed, 18 Nov 2026 23:03:51 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DA7E160A2631
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020; t=1795043030;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=EDQ/Bv0EKc6YV/NWFzsUR1sguRZd0XohMFdCN/XmTyg=;
	b=RQbWaqGCv7kOzV30jMMyAx9/Xjq5hrVXuOiW5QsmAf58nqahidDGCVHMVM2mVxZhVziECc
	nmPQpKM+fmyik0hlcqc3Ak9T529zn7uWvireTX78uoN2/9/rTVt2db25gwxGyN+k9Za9Ly
	CoTotsivPkQdzDJUV6Ox0z7VahNOGNZMLpSktyzd7kotQdbu9+vY6t//kiQkqJQO9dCFO+
	0HFs56vRFXgdvrA+8IHgnrt1hBrBVX/AinR/ZF9qcVrTEMO0qf9VD284ag3OxkdAyvU+1/
	QaneiKcZRmTKCxUnlSQ5qmPMVpuuVfearkieRpT6MvMw/vpprdGQv7rCMoaA6A==
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
	s=2020e; t=1795043030;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=EDQ/Bv0EKc6YV/NWFzsUR1sguRZd0XohMFdCN/XmTyg=;
	b=dgZrJwWEHiC7Kfu/38trUrGUjbpNDHf4fjPVlb9zV8C8S9b2W1RDoDHffPs3rVnz9OfZPS
	12IZOTqOi8FYSgBg==
X-Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ryan Roberts <ryan.roberts@arm.com>,
	Breno Leitao <leitao@debian.org>,
	printk@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Gustavo Luiz Duarte <gustavold@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org
X-In-Reply-To: <20261118230345.808560-1-john.ogness@linutronix.de>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list