Article View: linux.kernel.netdev
Article #17296[PATCH net v2 1/3] igb: fix RTNL assertion when resuming from runtime suspend
From: Antonio Quartulli
Date: Mon, 16 Nov 2026 15:30
Date: Mon, 16 Nov 2026 15:30
70 lines
11944 bytes
11944 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".
Skip them when resuming. The counts are set again on every regular open,
which happens under RTNL; the only case left out is a fallback from
MSI-X to MSI during a resume, which leaves the stack with more queues
than the device uses until the next open.
Tested with the 82576 emulated by QEMU.
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>
---
v2:
- keep setting the queue counts in __igb_open() after igb_request_irq(),
only skipping them on runtime resume: setting them in igb_open()
before the device was resumed broke the MSI-X to MSI fallback and XDP
setup on a runtime suspended device (Sashiko)
- drop the reference to igc, which has the same ordering problem
Note: igc sets the queue counts in igc_open() before igc_request_irq(),
which can fall back to MSI, since 6f31d6b643a3 ("igc: Refactor runtime
power management flow"). We didn't have igc hardware to test a fix with,
so no igc patch is sent for now.
drivers/net/ethernet/intel/igb/igb_main.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 78f0786..4447546 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -4178,16 +4178,20 @@ 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;
+ /* Notify the stack of the actual queue counts. This needs RTNL,
+ * which isn't held when resuming from runtime suspend.
+ */
+ if (!resuming) {
+ 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;
+ 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);
--
2.56.0
Technical Details
Message-ID:
<20261116153041.3002666-2-antonio@mandelbit.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364510-linux-kernel-netdev=dewy.ruReferences:
<20261116153041.3002666-1-antonio@mandelbit.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364510-linux-kernel-netdev=dewy.ru From: antonio@mandelbit.com (Antonio Quartulli) Newsgroups: linux.kernel.netdev Subject: [PATCH net v2 1/3] igb: fix RTNL assertion when resuming from runtime suspend Date: Mon, 16 Nov 2026 16:30:37 +0100 Organization: Usenet Network Message-ID: <20261116153041.3002666-2-antonio@mandelbit.com> References: <20261116153041.3002666-1-antonio@mandelbit.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2100255"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:wN8IU9+4ge5Ld1HDVX6eOUg336w= sha256:FiXLx/3kh8tSTmMZA0BhE3X2Z/dlrCDkheFYf9sJEAE= sha1:vYWyiFQf9kUJVHrbTr3XSR41IcY= sha256:1U+M48OoQcMcW9v795bBplvAGYr+bZV1d8XJvD36d0U= 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 44C9D114C5A; Mon, 16 Nov 2026 18:31:50 +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 aTJTnsPPLdkm; Mon, 16 Nov 2026 18:31:42 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-364510-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 D5948114CAD; Mon, 16 Nov 2026 18:31:33 +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 5E79B219AA; Mon, 16 Nov 2026 15:31:23 +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=1794843071; b=diqnImy+KYlqXw8isacbkSs9jNE++L+ZUUMtKQ8UB7L0pC2QuzwWnCplJE4VFj7uGECP 8mHPqK35MDhOWwuKtwm9zm1bV+G746AyIkncHQQ/3nGYDQ7YATUYj3rGfF64BAD8hI5aU uaS5ucMV7u35AzWd8SdA5EVqdh6MNgcebTTJJuYlpQ4pAgsBzUl1bhxxhwzWeaTt1VI0+ 5Bvkmi1YRg+rx0who+OpimC+ZBR1JciKy/8IrbtFVlS9d2tHYorE57xqS57LmbwCq//0t LRpBP4JnJhbBfBqMnKwOqzSTfpRRBHdBA05HcKGhvuV1LxBm65eHJyiOwM8dFyDUK2w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794843071; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:From:To: Cc:Subject:Date:Message-ID:X-Mailer: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:X-Rspamd-Queue-Id; bh=/KvAfHc/QLMwdWXcJBMsR4GboKbodePkCw59oer/jOY=; b=J1XmDoakzuvUtoKxp4Mg8WYjSle5WH2RO1fAzScGBqA6Pj6i5lu7LdRt5Ezc86YaC1P+ +wPM9CZ3SUny+0a92aQ72h0zq4yrSNMo5mC6NpHfNQYsxvkK7UOiIH4mG2VtLVQsIN//z 7DcVpI3iBawSbtJR93ILHGhoK/Zu5moLmHS4wEH9dRr1+aDiVV/fjmDVpHtXfJHlxLxE2 LKZeGXGAAhHwcOyzeW2y1o/UbkB9J5sPXJz8BR7hoSJVSi+AZe8CQeXWjXR87sIni6pEu ERYnaY98G4CmJzxMvuLCQPw/LfaHfGFHpTe7G3JJbjyuNewBwa45gKzRiTfQswF6Q7Q== 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="X8DIOU/s"; 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 88E2D606A32A; Mon, 16 Nov 2026 15:31:11 +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=X8DIOU/s X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=195.10.208.55 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794843060; b=PqrwYdPNtGNbV8RtjWRf6hoa5mzysbX88Ni3O67P08+2XWf7XwnsEVc9WnQjCdY/+9rL /uP2iTxC0bYjvSuhuqjnrSd4xwnOMKnnvzY9HiOggIn/dtdFKkCyciO49nZjjdoPwW2jN 6ef7iqC7gXtO7huaE2j7lEmu3n1PF1ilIKJc7PAVMPBv7PYa7wYe6WlBCcQUMXss9gziR qMd7UEPB15OPeu8uDi6Vl/segD1EFpbRcJX/FsjyZQaD8FzkfXot+9NofRT6n3gtkJws6 uxyWJG3Rji1+AY7HgM4MO/bhvGn4rGC1csziOs0//M23cQiqxjxenyX89X99YB59QAw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794843060; h=DMARC-Filter:Received:DKIM-Signature:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Queue-Id; bh=/KvAfHc/QLMwdWXcJBMsR4GboKbodePkCw59oer/jOY=; b=wUpEFDDuD8+fnAk0RX3gG7CLD3IF6sugT7neVuGqAGhp94DKxywwhbLM1I5WVjN1RC1q b8oZyN2dQIv+32VQpJo1Ca3qou2yeQuIwEhOEuIYwLkut/b/8RL5RE/d28nNAWqOoJTMP VY0/Wu0vNjtDMMwoCBxiQm17mubYLLoflRgp0U3dvs9QFbayRCHzYLzyyJfaMluC8AixJ yKz8UefoUViWZIvT/lyLMYiBFsr72/XPHHBQab2a5tKzL0B1DB0kIrshqNULnu2LE+d0+ NknWx9qY7i3u6rFBFCUg3HnWwa7lE1im52BzClGOENw5PhJ6D93X2/DYYLn7ZEILing== 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="X8DIOU/s"; arc=none smtp.remote-ip=195.10.208.55 X-Received: from mout-b-110.mailbox.org (mout-b-110.mailbox.org [195.10.208.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 6E3BD606A33F; Mon, 16 Nov 2026 15:30:59 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6E3BD606A33F 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-110.mailbox.org (Postfix) with ESMTPS id 4jSsJT6Wm7zNlbp; Mon, 16 Nov 2026 16:30:49 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandelbit.com; s=MBO0001; t=1794843049; 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=/KvAfHc/QLMwdWXcJBMsR4GboKbodePkCw59oer/jOY=; b=X8DIOU/sKPJhcdO2Bxc1cYL7LCCupLRpR8BlauYVB/oPs+8MllRzMcVaxUVRD4I+nf0Aqw YmL5Hn/jEWEtHcAws8uCwJz0hYtLV3z/yRRDgRclmrxzE3FY/Rtp35Ka+r2pmt1XbWLxZF eeVo4Vx0X8QvtU9vOKguDtqyaOQD7/o8RKO9jAHhWINfo14OMf8QjBWYsLJFrf5PKik/El mxTTrjq3NbfP6wLv8Ji4Nd0q6BNJ2A1+OCt5KOUFlSl+pphf7n95YH4nsITDk7y3z62O0w OS121uyroT4qHPF5gza/ivPOUfRLAvWxfXD2qq7w4so7ghcMiefOObjGsyBLkA== 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.1 X-In-Reply-To: <20261116153041.3002666-1-antonio@mandelbit.com> 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: 4jSsJT6Wm7zNlbp