🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15724

[PATCH net 1/3] igb: fix RTNL assertion when resuming from runtime suspend

#15724
From: Antonio Quartulli
Date: Fri, 13 Nov 2026 10:58
71 lines
11299 bytes
Since commit ac8c58f5b535 ("igb: fix deadlock caused by taking RTNL in
RPM resume path") __igb_resume() doesn't take RTNL for runtime resume,
but __igb_open() still calls netif_set_real_num_{tx,rx}_queues(), which
require it. An asynchronous runtime resume (e.g. after the link comes
back) then triggers "RTNL: assertion failed".

The queue counts only change on paths that re-open the device under
RTNL (ethtool -L, SR-IOV reconfiguration): set them in igb_open() only,
as igc does since commit 6f31d6b643a3 ("igc: Refactor runtime power
management flow").

Fixes: ac8c58f5b535 ("igb: fix deadlock caused by taking RTNL in RPM resume path")
Cc: stable@vger.kernel.org
Closes: https://bugzilla.ipfire.org/show_bug.cgi?id=13562
Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 24 +++++++++++------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 78f0786..bd1185d 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4178,17 +4178,6 @@ static int __igb_open(struct net_device *netdev, bool resuming)
 	if (err)
 		goto err_req_irq;
 
-	/* Notify the stack of the actual queue counts. */
-	err = netif_set_real_num_tx_queues(adapter->netdev,
-					   adapter->num_tx_queues);
-	if (err)
-		goto err_set_queues;
-
-	err = netif_set_real_num_rx_queues(adapter->netdev,
-					   adapter->num_rx_queues);
-	if (err)
-		goto err_set_queues;
-
 	/* From here on the code is the same as igb_up() */
 	clear_bit(__IGB_DOWN, &adapter->state);
 
@@ -4223,8 +4212,6 @@ static int __igb_open(struct net_device *netdev, bool resuming)
 
 	return 0;
 
-err_set_queues:
-	igb_free_irq(adapter);
 err_req_irq:
 	igb_release_hw_control(adapter);
 	igb_power_down_link(adapter);
@@ -4241,6 +4228,17 @@ err_setup_tx:
 
 int igb_open(struct net_device *netdev)
 {
+	struct igb_adapter *adapter = netdev_priv(netdev);
+	int err;
+
+	/* Notify the stack of the actual queue counts. */
+	err = netif_set_real_num_queues(netdev, adapter->num_tx_queues,
+					adapter->num_rx_queues);
+	if (err) {
+		netdev_err(netdev, "error setting real queue count\n");
+		return err;
+	}
+
 	return __igb_open(netdev, false);
 }
 
-- 
2.56.0
Technical Details
Message-ID: <20261113105835.3821433-1-antonio@mandelbit.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362578-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362578-linux-kernel-netdev=dewy.ru
From: antonio@mandelbit.com (Antonio Quartulli)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net 1/3] igb: fix RTNL assertion when resuming from runtime suspend
Date: Fri, 13 Nov 2026 11:58:31 +0100
Organization: Usenet Network
Message-ID: <20261113105835.3821433-1-antonio@mandelbit.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1341907"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:22yVwHbWehbmFAGRqugMIAOaaX8= sha256:Ri9NLKE5G1vI8reJ0Fb7ILajUENImBCHYOGJkRjX5jA=
	sha1:AQhovvLiBhV0jPuVosDBCf5EVyQ= sha256:GX7bpKegluHWmzC2i0PO9j2NJd3dymHown6Kuoi8C2k=
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 A0B3C114523; Fri, 13 Nov 2026 15:49:04 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=mandelbit.com
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 dvMf_8KY-nXJ;
	Fri, 13 Nov 2026 15:49:00 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-362578-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=mandelbit.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id E70EC1144FC; Fri, 13 Nov 2026 15:48:51 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 166F5269619; Fri, 13 Nov 2026 11:02:25 +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=1794567535;
	b=3oKB/GlVmuFUNCTzpNRRmLCrb+b6oDZ3Uyk5ADPhCWgbG1kdRo+EPW1WsGa1qEVEIxyS
	 TIprrSnIxQEzWSvR3G62I1LPhaaUq8Mpzi1rsBVkRSLyBZXPqBiNEUMXNCxSaWx9yThYt
	 fNUVJOigjpdYysEzH+hYXL9xO/AcX6Z67E/AXlRlbXRuOEYVFWQcp6vzka+yDU/2vk7f5
	 iP/hF7QsNQ3V9R67Spz+EdJXcW/PrDVPTbWWaVm5hAffwud2hnGolHCiHUr+07AMg4yd3
	 gjmu/rbga8FST1XZ4KVdQV1enHjL61+X2iOlEYDJZ4e7DQYk3CJE/zgeV+9rA8898lA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794567535;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To:
	 Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Transfer-Encoding:X-Rspamd-Queue-Id;
	bh=r1yDilK6qB0Us3n3DQsotlXwYJQ4+ehyKDqtQf7/FDs=;
	b=K0z/wsqpXuy3hZjRTzwnEUKeKZts/RsZhU3yoqFLNNbKGuUnGmd+qmkLsQLxg/mZ/FZ8
	 GkgkAq2eJs5gVtWYL8XdXnPZFzS5656DOweYzBri+u8ccYjMShsQiEphKfic84wFP5yto
	 5TWcLBGfyXa/QA1PvRMyatA6wZb8XojwzW5wEVFWKq6j7+FaGBy+5SX3OiCVGo783M9CU
	 6cMqhHPrjw5kUU/m0W4jtZW0AWQOSRyVB6aag//Fjx0cpTZPWN1QFSzqMW8okS7fgFeDF
	 DyePkKEnCmGcZTg/V1OULzjU9cJOOC2U0jYYAE7oxjTtfDfJxVC5HcGb8PonhXBUyng==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=FN5n39gl;
	dmarc=none header.from=mandelbit.com;
	spf=pass smtp.mailfrom=mandelbit.com;
	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 11423606BDA4;
	Fri, 13 Nov 2026 10:58:55 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=FN5n39gl
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.42
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794567529;
	b=w2qQNmb46gn06K5rjHgBTV/zcIUSCtAJOfYXjgnAprkJ5rR2UeAxjtn/sCbsQTpFQDg7
	 lSmB/iAvFE5o98TocRL0i95RAY240jii2c7WiJhFs/YpIrlKh6z1q0pd35Y1MrkbnMw1Q
	 htAv23Eq9M3Be3aWwL8fK6ofHQxa5adh7zfSWzlntk48Wwi465H/tMkZj3hNOWZDnKKeX
	 mjkcUNfShQrWRlXF+8zuwEW4gvdJyiofmVtN4CaJ/4MHPb6oC3PN29qPgQVaAWs/3i0MF
	 Lit+ueOom2vcANn0vhFJnkprDVJUu/la5UerWvv1NTs4XH4B/ZsPMu4auIV26Pfamcg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794567529;
	h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date:
	 Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding:
	 X-Rspamd-Queue-Id;
	bh=r1yDilK6qB0Us3n3DQsotlXwYJQ4+ehyKDqtQf7/FDs=;
	b=HPEZSmD9Yg6Yx7I1unVc1PsxmapaiNSFFaWFr2Re7aK6rbFvI2brzxK7w3ELoHeesR07
	 hmci46Au/s0YftUmnZGtir+Ra5DfIenFn/mSC6j2RHCGxHghFAULIL8B4PlfP5XiyM3SU
	 zjspIZIo6sgJyJm12NFmI625qbrGuUOtre4g8LpSOXU1iLiVD+OGgQbQFT6rm8X1jWYe9
	 BGaxtYXZS2coSzbdAwP6nUf7ps1lF6T1jjbB9DQtTaVVu3NimguMVxnLaEYv3c/pWTZW3
	 oQS1KrTaSGRWWFXDH6qezeRotGg/JzXEKTm9PG8ooP4Jzi4PRmPSAopjlHBgLvCMOkg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=mandelbit.com;
	spf=pass smtp.mailfrom=mandelbit.com;
	dkim=pass header.d=mandelbit.com header.i=@mandelbit.com header.a=rsa-sha256 header.s=MBO0001 header.b=FN5n39gl;
	arc=none smtp.remote-ip=195.10.208.42
X-Received: from mout-b-112.mailbox.org (mout-b-112.mailbox.org [195.10.208.42])
	(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 230B2606B27C;
	Fri, 13 Nov 2026 10:58:47 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 230B2606B27C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=mandelbit.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mandelbit.com
X-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by mout-b-112.mailbox.org (Postfix) with ESMTPS id 4jQvPv6lYNz5xyN;
	Fri, 13 Nov 2026 11:58:43 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com;
	s=MBO0001; t=1794567523;
	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;
	bh=r1yDilK6qB0Us3n3DQsotlXwYJQ4+ehyKDqtQf7/FDs=;
	b=FN5n39glsRmZ8Hy5vSXpC/z7hej2XvnC2OeRTXF5nEmyUua2UvrYARCFnReM+8HUF/z0N0
	xjH+mKwM+gXu1p4Z7urvEKcVqaTVo9647PWYnQ1P1c5rrG9nTily5lv70iC1Dl82TWNpvs
	XGftQsx8ydB4PhEaQkomqkIz5oACDg4CywU2tVGkakI3uDZqmhQbo0c1mIwJtHL+WokW+L
	ca1x/XtLlKvp+Az3Ud01FldzqcY8SyppSZ86TnGNtDrvyKwQCaXFzsTJ3bvSAFdXM0pEkc
	h86wDZxZBmVB1qHxEK1M/iypiRkizsQ6kLDQN/+uKapD0U5Q+tVfxw+FAkSvyA==
X-Authentication-Results: outgoing_mbo_mout;
	dkim=none;
	spf=pass (outgoing_mbo_mout: domain of antonio@mandelbit.com designates 2001:67c:2050:b231:465::1 as permitted sender) smtp.mailfrom=antonio@mandelbit.com
X-Cc: Antonio Quartulli <antonio@mandelbit.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.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>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
X-Mailer: git-send-email 2.56.0
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
X-Rspamd-Queue-Id: 4jQvPv6lYNz5xyN