Article View: linux.kernel.netdev
Article #13161[PATCH printk 6/6] netconsole: Always perform unsafe flushing on panic/kdb/restart
From: John Ogness
Date: Mon, 09 Nov 2026 12:31
Date: Mon, 09 Nov 2026 12:31
40 lines
11112 bytes
11112 bytes
As a legacy console the netconsole would perform unsafe flushing
during panic/kdb/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 unsafe flushing policies to allow the netconsole to perform
unsafe flushing during all panic/kdb/restart variations, just as it
did when it was a legacy console.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
drivers/net/netconsole.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 267254f046de9..6c1587958e915 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -2695,6 +2695,8 @@ 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,
+ .unsafe_flush_flags = NBCON_PANIC_FLUSH | NBCON_PANIC_PRINTK | NBCON_KDB |
+ NBCON_NORMAL_NOTHREAD,
.write_thread = netconsole_write_ext,
.write_atomic = netconsole_write_ext,
.device_lock = netconsole_device_lock,
@@ -2704,6 +2706,8 @@ static struct console netconsole_ext = {
static struct console netconsole = {
.name = "netcon",
.flags = CON_ENABLED | CON_NBCON | CON_NBCON_ATOMIC_UNSAFE,
+ .unsafe_flush_flags = NBCON_PANIC_FLUSH | NBCON_PANIC_PRINTK | NBCON_KDB |
+ NBCON_NORMAL_NOTHREAD,
.write_thread = netconsole_write_basic,
.write_atomic = netconsole_write_basic,
.device_lock = netconsole_device_lock,
--
2.47.3
Technical Details
Message-ID:
<20261109123127.489676-7-john.ogness@linutronix.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359269-linux-kernel-netdev=dewy.ruReferences:
<20261109123127.489676-1-john.ogness@linutronix.de>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359269-linux-kernel-netdev=dewy.ru From: john.ogness@linutronix.de (John Ogness) Newsgroups: linux.kernel.netdev Subject: [PATCH printk 6/6] netconsole: Always perform unsafe flushing on panic/kdb/restart Date: Mon, 9 Nov 2026 13:37:23 +0106 Organization: Usenet Network Message-ID: <20261109123127.489676-7-john.ogness@linutronix.de> References: <20261109123127.489676-1-john.ogness@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="352414"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:cMCFaRaAJQTQ0hq+RvdVGy9IZ2I= sha256:bb3U8AAGatWUbo3PF4vo085a6YTY3SeZyP0Yy+wjWpE= sha1:Kcovu/fuvJaIunO/fRqrlWZ28VM= sha256:vKzYkj4y3DFfNCjKW0k8tBNzXNMnSfuqlgwF7mOSmbQ= 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 89B231137C7; Mon, 9 Nov 2026 15:36:32 +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=YGDzl48j; dkim=neutral reason="invalid (unsupported algorithm ed25519-sha256)" header.d=linutronix.de header.b=6xr7PFmf 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 BmUgBiFNdN9t; Mon, 9 Nov 2026 15:36:29 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-359269-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 31BA41137C0; Mon, 9 Nov 2026 15:36:15 +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 0A7C1C3B3C; Mon, 9 Nov 2026 12:31:47 +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=1794227496; b=bCYHGBUu6lZl0ZrOOvaaNRAI6ipybGg/RJbZOoslcgIez3gyTytvRyKut+bp73FCkad0 Dw2FortY09lBAvwTyu36psWMxu4YO84AIBooV+gCIzd+OcCGiW7IDYwsgMwlAoLvGwqsO HUe3oJ+Bgk/zMWCll9r2rrNVjUCdJ8xIpv80zDebr2GCiGimEcacT7c8eBnYyl2Fqf1ej ieH+l/ihttpTd4N97dnXARKs6EjaNafFEL4LPC3jiDVSDx1cX1l2cXtbGqna8AoI35hTI 0RM2s01wZwLSwDxLqI/PtU1GVlg5yEG9wA8xkK34p5GJqnVnxhSoLVnXTrj0/fuZG1Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794227496; 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=U+Dj0snY+kfTXfG+VRMdB3cQPdoVXWSwHQgeJoQUXLU=; b=URxbS3xalQXwrK5YcIzvvpfzgbZFoCF5f0Qi8cTQuf53hSQGgE8uFf+BMarcB5BUA8/L vliSwG2MKYKeAVl8NF96OKqxzMvKojzrYv9QZZJ5bNBd345KphVtDuKitR4Fv0FScbdBv pNKTN4oVFqyfQgvEeILG356Z4nG99jxb5JxmEzvSQWR+DIqXurzQV+gDVRxuf8bTrm8YB Lbgpr+vQ/xHPtXig1fg2Pno/bFoyDsw3IRI5Ea0sgRYB2achGupXKT8T7ufsOWVtLp63T ANPwaB0z31Ad8ccBcD/e8lmh0HKUGvSVgI7Kk4C8srL9jCkOq1uSpJR6NgpPNNcDFew== 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=YGDzl48j; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=6xr7PFmf; 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 EF26F606D828; Mon, 9 Nov 2026 12:31:35 +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=YGDzl48j; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=6xr7PFmf 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=1794227495; b=5stgj6gAuvA7FNLrMhP+PZjkFCm38gjyDtfDC/GlWTUHIsBsZkLJV3fo8uZr9WYoAGyd dw1yTFUt2SNinssdcDRKednMfOocLOii+XNbNFLv9bhJ8m77oAh0xJT1nXWaWZnde1AMU hMFCCsRZNvMdPpD8enGPbStlGEznFp8Yae/AQjeyE7vd5zF/Coc/GRFbgcg33Jsg/QxXO GRJDnmFtpmVbA66Z1fra24+1SiSD6KNt4p0mSUmOSZcOIo7+l/V0Z045cSP2nOfCnTbwO HHyEHGo4SOjfVKj1GEafQtxKoBdhottVBg4KFMeYBgiuL8J0QAL06V6TXwIv2Ak4cHA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794227495; h=DMARC-Filter:From:DKIM-Signature:DKIM-Signature:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=U+Dj0snY+kfTXfG+VRMdB3cQPdoVXWSwHQgeJoQUXLU=; b=UzT/hdAOQP+ksuIUkmlQ28go7qLxeNVidrG4jmMAHRtx+fNd58PMfaRHoj3UGuHCCNwx Ntl6eQTdSJ4LBqkPSpCQwTjyuFWckwz0k8IFSDUu+hml1As0FGJ4yV+Gzzn/WuT8OH2fO Di+AQVuFFUcw9D52LU0UIkAuM+SA1Xf9K4SomIhCXjQeXS5nL6wYSkzWHNUkuGCHCue+D LpFvmBhbtzBHu5DQbf/oRduhcZTgitPjGmVWO3bgvwokvZc4lu82qaMwBEY34uTNn3Lge tI1CCTXyxVm0iVgPo6cfNYVmyFy1OTIxaDkrQ+ybiGjHxZc4KaKF5+veXciVw9KTJYQ== 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=YGDzl48j; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=6xr7PFmf; 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 23941606D817; Mon, 9 Nov 2026 12:31:34 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 23941606D817 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=1794227492; 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=U+Dj0snY+kfTXfG+VRMdB3cQPdoVXWSwHQgeJoQUXLU=; b=YGDzl48jYxHNdQWqwzNV5+QEK5o2Kg+YtE6I5R275wGjN0HYtjQdCgRd5ky/lY+rhD0Qeo tHw/E1efPQUfsZ/jlNeTR1oxqYCbkOZGnVg+Uq5Vv8wfKDDtqGaZn/WrDTF9WeWxAURlEB pcZqWoViGMQFsNmPlbCpu+DOuuflw21r0Gnh9BIpQbVgawuzs5a3FXsauNOmusnTnQ70u7 GgNqniIODXVigg0MAmdDaZbxdtD9DtTMXx3naSCdTZlXFr2nCt4AKRzJaVPU8/roKKBt6k gzvy1JaX2Opas0XDVcwX4MkVopbyv50xHXVqg7JKBGjAWakNamPG8CMCDsKaEg== X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1794227492; 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=U+Dj0snY+kfTXfG+VRMdB3cQPdoVXWSwHQgeJoQUXLU=; b=6xr7PFmfvnfZEgJrYF2lOI1GpwHyCQZKyXHko+03Y4661Q1+t74W76iQkYV+5jIqHY/Wc4 2HCIiZcLDXSmuJAA== 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: <20261109123127.489676-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