Re: [PATCH net v2 1/3] igb: fix RTNL assertion when resuming from runtime suspend
From: Antonio Quartulli
Date: Wed Nov 18 2026 - 09:53:05 EST
Hi Janis, thanks for the review!
On 18/11/2026 14:21, Janis Edvarts Lacis wrote:
On 16 Nov 16:30, Antonio Quartulli wrote:
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.
RTNL is not held only on runtime resume, it is held on a normal resume.
__igb_open() skips netif_set_real_num_{tx,rx}_queues() for both resume
types. Maybe it makes sense to skip them only on runtime resume when the
RTNL is not held?
You're right.
RTNL is held on normal (system sleep) resume, so the counts can and should be set there.
May I ask why is it okay to leave out the fallback case, can't it lead
to trouble if the counts are not updated but a fallback happens?
Ouch..you're right again.
The fallback case can't be left out: with fewer rings than the stack's real queue count, igb_tx_queue_mapping() maps several TX queues onto tx_ring[0], each under its own xmit lock, and igb_xsk_pool_disable() can index a ring that doesn't exist (Sashiko reported the same on this version....).
To summarize: in v3 I'll set the counts directly on normal resume and on runtime resume from a work item that takes RTNL (as patch 2 already does for the NAPI links).
Until the work item has run, igb_xmit_frame() will drop packets for queues the device doesn't have instead of mapping them onto tx_ring[0] (the stack drops them anyway when the count is lowered), and the XSK disable path will skip rings that don't exist.
Best,
Best regards,
Janis
--
Antonio Quartulli
CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com