Article View: linux.kernel.netdev
Article #20155[PATCH printk v4 8/8] netconsole: Perform unsafe flushing on panic and emergency restart
From: John Ogness
Date: Sat, 21 Nov 2026 16:35
Date: Sat, 21 Nov 2026 16:35
38 lines
11012 bytes
11012 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:
<20261121163557.963029-9-john.ogness@linutronix.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368366-linux-kernel-netdev=dewy.ruReferences:
<20261121163557.963029-1-john.ogness@linutronix.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368366-linux-kernel-netdev=dewy.ru From: john.ogness@linutronix.de (John Ogness) Newsgroups: linux.kernel.netdev Subject: [PATCH printk v4 8/8] netconsole: Perform unsafe flushing on panic and emergency restart Date: Sat, 21 Nov 2026 17:41:56 +0106 Organization: Usenet Network Message-ID: <20261121163557.963029-9-john.ogness@linutronix.de> References: <20261121163557.963029-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3445001"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Kyr+skdvuLfNIfF2YGYWKNFDT78= sha256:JoBin+O4pOrc1ZM/C253c+E86HA+C0QYVFbzsJGOdfM= sha1:Atac7sZJtjC7K2AiylFMe5QNE5I= sha256:fQeVhBZHjS5L7xS/NW2RFvUgDBCUhPKGOQQXzVHCblE= 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 A55E2115B8E; Sat, 21 Nov 2026 19:36:43 +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=GswljoSa; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=lJ03ZMbX 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 VjvGaVwjMd9z; Sat, 21 Nov 2026 19:36:40 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-368366-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 C4C1C115B5C; Sat, 21 Nov 2026 19:36:24 +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 D652F32EA4; Sat, 21 Nov 2026 16:36:18 +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=1795278970; b=3vYmbGNrmqVuwU1g9rQo5tft1oOwRdUGXsV655tkGa92haacjhBFzzq+G3CraIL5fB2M n6Wvld8tQAs5go1UFFDYtVCihbTt84AH8Q4l7fVhfLQsl8AAnExneoa6HITndJ9Xqy24X H+EU6aGuSp8EFtw++GaPaI0yh/CoCZ+FDyX42qSNzMuELEnOsn8xBA8nxmJoDcqdRrIi4 LYALbJ57dfYK2wVPNCkUDmUAXXm3b+LMU5nhWC43Ue4BPuDmH+RlNmyH0akM3LnZU+aGE JK20oNHsq/doJl3+SwWC6loTSUbMchDOScAiIY6R45PuGghKtrFrxIKqC0xXT/6bYBg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795278970; 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=EQAXKgZFr1tWTRFMbuRwgpNujk3kf8bjriARQw6yue/6YYFqdl5NSja8bEaNyh9szDbG BybBqXbe1sg4bWAXgyKXSo9IM17ZDjs5DFzoUylxmIR1PLxygy/vApnMp1VpWJ6RMV0mN nr0OIyEdCnULYdAmEumH+JjO2B6gHotw3jXJ31RHfUE1MgF7n5O9jmds+5XASnqhj8mNf +JaBCmBCa8wOwXJxPyOD99GT1sGytjCIOD14fOkTjasc8pJFDSu4WLLOfExKTounWmOFo SMpEot3MoZGsiEmwJ3wDhMeBwyEeslzwgHO7+w9z0spjgTL9dHUdCxTLBfmzoUKfmaQ== 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=GswljoSa; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=lJ03ZMbX; 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 90208606A6B8; Sat, 21 Nov 2026 16:36:10 +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=GswljoSa; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=lJ03ZMbX 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=1795278969; b=pgzsiIpf0WnBh/BPuoq1maZAC9EQl1w4POe1OTwP9nA9YXeHLpMfURUK3xvagdBGgtE2 vh7Rzv0xiJZYhUtG3I3V8FEKW8wl4LCje8FqroukOcehlNx53B/bSFZqcg2dS4TRiZ+Bk 0s4jS1h0IzgPwcAbJ3uACJe5Vl1xbbLUNA8B7wwZa3Y+/yrcGGAnwNLWMaiU2PKTPfMRs fb/BP4SIuAcE6ebRpB30TTCSnSF/2Z8/sE8EPT9s2roNlA79DH9z5tffwRLr/H20OiDTZ V6MokqK1jJIpVSYa3GGskTvBI8QpeHRIpwSISt7PnrMdCCs32/vaq+8IwTP/LGeh9Qg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795278969; 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=L1qP9S10P/HxqHKW65wkeYHX9lc4S8ZOY9/pq0BGb5aLmLpXHHWMDcCZAQ4jk3XHUk4G LJg9A+HUUiG8ItaUjpNFzaz1eVPDLLWRhLihLeTj/4ue2XeTcqdzdyFMoHgeXunuV1IPi J1wa9Mx+8ByXXSDch1S699AP50O/xqX8oZk0tPABF5l1PQ51uL1uXEvaNoHxKLIY1JYFq fDMVIr2YC60PGLoKfc0OzKCXHOWA75n1xk/8/yCkZ1ZTt63cyiahwN/7T4eVnQz9PsQgG p6tqV8xomkRI6df67HG2CWTUIL69X6tiuQ6maX9fhfOEudlGrB7/6mbKZjFA8gn7PAw== 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=GswljoSa; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=lJ03ZMbX; 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 453CF606A691; Sat, 21 Nov 2026 16:36:09 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 453CF606A691 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=1795278964; 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=GswljoSaIKK7FTexe3jnnXhzQTZWDo2vXVpsgxP5AeZNnZYc00+gzmOtDuL87IxytV7o+X 6HUT5g8o5JZZfXgk5DB66Gda5BSUqttHz3BDADYNYW9zTxpCCgyPcb+olMkeZLJi98U/9J C7e0zgbGX85jpHbsAUFCTzepVn3jcOB6sdBUPD2kAojeo/9n42SU5RAjvQa1AjGrCiPg9W wp7UCaeVYmQa8WvUyzgEOggNY915UN1sJPylOI4pLAeenYnoiXQ6xecKXqtjJ5q5D+RIOL 31kk5Re7SZ+Bf81EoYX4t2m2K4EK8PISLot0wErL5oVq7vsYlHlz+dY0NlYAAg== X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1795278964; 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=lJ03ZMbXvgWyp1jv7gu0KXMuHYXGRGO61r+ZojzjJwLBWmb8mZQeyRiuIUjgjlo1osg5IJ Lj9y9UOnb/E2gxCw== 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: <20261121163557.963029-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