Article View: linux.kernel.netdev
Article #25486Re: [PATCH net v6 3/7] igb: fix RTNL assertion when resuming from runtime suspend
From: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 22:20
Date: Tue, 01 Dec 2026 22:20
112 lines
12112 bytes
12112 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] At this commit, the runtime-resume path still hits the RTNL
assertion the patch says it fixes.
--
igb: fix RTNL assertion when resuming from runtime suspend
On runtime resume, __igb_open() no longer calls netif_set_real_num_queues(),
since RTNL is not held there. A new rtnl_resume_task work item does it
later under RTNL. Until that work runs, igb_xmit_frame() drops packets on
stack queues beyond adapter->num_tx_queues.
Closes: https://bugzilla.ipfire.org/show_bug.cgi?id=13562
> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
> index 2fb9615d3bab3..5774a4d3c9810 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
[ ... ]
> @@ -4181,16 +4209,15 @@ 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;
> + /* Notify the stack of the actual queue counts. This needs RTNL: on
> + * runtime resume igb_rtnl_resume_task() does it.
> + */
> + if (rtnl_held) {
> + err = netif_set_real_num_queues(netdev, adapter->num_tx_queues,
> + 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);
[Severity: Medium]
Does runtime resume still hit an RTNL assertion a few lines below this?
Only netif_set_real_num_queues() checks rtnl_held. The loop right after
clear_bit() still runs on every path:
__igb_open() {
...
for (i = 0; i < adapter->num_q_vectors; i++) {
napi = &adapter->q_vector[i]->napi;
napi_enable(napi);
igb_set_queue_napi(adapter, i, napi);
}
...
}
igb_set_queue_napi() calls netif_queue_set_napi() for the rx and tx ring
of each vector. netif_queue_set_napi() in net/core/dev.c does:
netdev_assert_locked_ops_compat_or_invisible(dev);
For a registered igb netdev that doesn't use the instance ops lock, this
becomes ASSERT_RTNL(). The resulting path would be:
igb_runtime_resume()
__igb_resume(dev, true)
__igb_open(netdev, true, false)
igb_set_queue_napi()
netif_queue_set_napi()
ASSERT_RTNL()
If so, every async runtime resume of a running interface would still
print "RTNL: assertion failed" with a WARN. The rxq->napi and txq->napi
pointers would also still be written without RTNL.
Also, igb_rtnl_resume_task() only restores the real queue counts.
__igb_shutdown() calls igb_clear_interrupt_scheme(), which frees the
q_vectors. Should the work item also link the queues to the new NAPIs
under RTNL?
A later patch in the series seems to fix this: "igb: link queues to
NAPIs under RTNL after runtime resume". It wraps igb_set_queue_napi() in
__igb_open() in an if (rtnl_held) check. It also calls a new
igb_link_queue_napis() from igb_rtnl_resume_task().
Could that change be folded into this commit? As it stands, this commit
is a bisect point that still triggers the assertion its subject says it
fixes.
[ ... ]
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130213740.3323814-1-antonio%40mandelbit.com
Technical Details
Message-ID:
<179616363685.3146.13049074289378045040@kernel.org>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-375379-linux-kernel-netdev=dewy.ruReferences:
<20261130213740.3323814-4-antonio@mandelbit.com>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-375379-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v6 3/7] igb: fix RTNL assertion when resuming from runtime suspend Date: Tue, 01 Dec 2026 22:20:36 +0000 Organization: Usenet Network Message-ID: <179616363685.3146.13049074289378045040@kernel.org> References: <20261130213740.3323814-4-antonio@mandelbit.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1831074"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:7m/YQu2wNrFBXpKebE6CMTjILmM= sha256:TX13BDBOVnsQGZQq0e39QVN/SX/cax8dHQb0Ffy1T8I= sha1:Tu4ztXKG8jtIlUw6iq1n7PS0mAI= sha256:bssSPZq5YIygqKToqy+cUFGnTf0AOPi5ZE8uS4hC94Y= 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 451AB1174BC; Wed, 2 Dec 2026 01:20:57 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.5 X-Spam-Status: No, score=-3.5 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org 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 nW0FhtCYD6wa; Wed, 2 Dec 2026 01:20:54 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-375379-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id BFF6F1174AD; Wed, 2 Dec 2026 01:20:45 +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 4BE8727F18; Tue, 1 Dec 2026 22:20:44 +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=1796163640; b=c7lJzWCYsgFvsbbOg9rnPq7atVEkw2snNByr0ZfSJapvWCIzxMZ21L8oA1vjG/g12mnP YbEbEYYz/uzOgKz/hop2tC+JqCBM87uCo9j081UtjLEF8uYaEVBoyQHeXdGo6qq5qJI0R Idz+6Ln3K69chgIc2juqBJFgUZ0gWMEw7/zie5Lp1mwNiuwpbNMUROPWepCHwX+lUNyng 28rkUpPZj3rwV3YAeKvulQ8adwXchz2q8DHaK5A5KGRdZSSibcB8clPHvxD3sFPL/DpMI TYhl59ntps6edUIRWyh0POP1/Agng6tJSU7IoQ5dMQ2lHpvYnSSYYPQ0uo3/Z7OZj7g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796163640; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=WfUoyhL9y2B0GtQlKof6uH9jqSpfzNC3Sb91g7FLb78=; b=fFOzirlH+e5TmIFCx+vjVjz4Dby6aZu3jUxzEJ4cc6aB3ickSrjbXXUzMlV4Q7dkmEjT FMmDEx8COC/+2HX3/7y7q1GdyktISEtyE2SYJRTq7S0IR7APq9I37ZB5NfKfx5DCx6CdJ 1kcnK3pf1LrVfMZLI7/PBWmnW4lDmuSoqBpV02nARPC0/7AloH5R/da5d1SMScwTSyLdo +6EkI2yMdN0BJljxF0wHGf9BWJOo5SEI/7rtSGYyadiCOVHUNeiAddJAWQMpGAL7Kz6S9 mVQv8elZe5HUWNiq+qFhxrcAN+dzPzzuScnwqLUykdyDRAZs6y0m6tFkFhtZ05qLkag== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="LH/lcWlf"; 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 3F3BB606A337; Tue, 1 Dec 2026 22:20:40 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LH/lcWlf X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796163639; b=JqjbXcTJaFa9crFAz1ndQFghDMY8EnvE4Dn/jSd6Z6Hp8N3VtTo/PnJ+rSjzqqfYymMK c7snBKRuwEbYYNGUJ2wymPCH8VbvS/mFFMni4zrh5yw74Nzll5bquwA31srK7E6hhiAq7 gHz8UMGpv69fUfLrtWpe7Obz6OoV+qdj3esp8LELuCoPtOyyf2kqOqfQlD/cO4DKuC/jk 32FRT31EsfH6U9GOuAdO2GCXfE35En7PgsHt4B9+sqM2JPy6T9gCNUDDknX7I6W3us132 D2XwQAZhzd+1ry/vbMtqhth2Do9PmQ+POHeoe/Tfrvo5TvPjbor6eWpvNPRpc6v0fwA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796163639; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=WfUoyhL9y2B0GtQlKof6uH9jqSpfzNC3Sb91g7FLb78=; b=IfwereQpJ73LQb1qb1f1kzIJDeG8ompM3oRvTdM5hbMtGCoG6oaDAFqWCjqEAQy4/3pJ xTJNzuHaRZDCxNWctDSiV86GmrFOEMnX0qQiqaJIuqDdDV6sSj74Vg3ytBqKGDD54+/F2 AbniUWJGmjqhDlvNg1Ti9UXSwlvkWf/BbV+57KWW76GIrnQDg9NKxiwJi0CY5Df0hzbgu lUZYjWmqOYfFIw8ImpFUeQQwI8uHljCOA0IuMA01nt9qIP2M3foQk22qNnZGxbaluU8fM S2RkAScBsmWmY5AjbznRP8jXZNbwDG31o9M5F0UuKCQw3WCR7fPOtxZMsLtKBLmUC3Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="LH/lcWlf"; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AEC7606A31A; Tue, 1 Dec 2026 22:20:39 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 565BD1F00893; Tue, 1 Dec 2026 22:20:37 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796163638; bh=WfUoyhL9y2B0GtQlKof6uH9jqSpfzNC3Sb91g7FLb78=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=LH/lcWlf60on6Z+Kqki6n98Th6REQLrjwHPOI/Dw3SZ1IeIq7WFztevsj7EjC8soy 9uprcuHO6a9vZnP2KDc87RELawg40wQNnFIcTTOEgkBQ2vSoGzqIGtgsOH74DRAS3s j+GrjYOuO9Y2BhJMN7d4hfCqdY185ZUDS+Rgymt9VcrMWGhRBzC5suFXdi6zRHJtOP JnrQwCfNUT/E/YoYOtSQQyQgpNjs/Dy1JrwlMc6HnulPInT+p2bJMvgRv9dlQHcSUD LN+njxDOhP3hrE6ZKGFsVCqATcSUMHDyjlE3yTxtiDB54pJdrQvBzAwG2S9fnae1Og zQQI93MeFaxLw== X-Cc: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, janislacis06@gmail.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, sriram.yagnaraman@ericsson.com, kurt@linutronix.de, maciej.fijalkowski@intel.com, hkallweit1@gmail.com, joe@dama.to, rafael@kernel.org, sven.auhagen@voleatech.de, netdev@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, stable@vger.kernel.org X-In-Reply-To: <20261130213740.3323814-4-antonio@mandelbit.com> X-sashiko-severity: Medium 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