Re: [PATCH net] net: expect instance lock in netdev_queue_get_dma_dev()
Simon Horman <[email protected]>
| Newsgroups | org.kernel.vger.io-uring,org.kernel.vger.netdev,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Aug 06, 2026 at 03:56:26PM -0700, Jakub Kicinski wrote: > netdev_queue_get_dma_dev() uses "compat" locking assert which wants > either the rtnl_lock or netdev instance lock. This is not right, > the callers are taking the instance lock unconditionally. All entry > points for queue config are purely instance locked. > > In other words the callers use netdev_get_by_index_lock(), not > netdev_get_by_index_lock_ops_compat(). All the state we will > access is effectively instance lock protected (it's const for > devices which are not ops-locked). > > Update the assert to avoid false positive warnings. > > Cc: [email protected] > Fixes: b6c5f9454ef34 ("io_uring/zcrx: call netdev_queue_get_dma_dev() under instance lock") > Reported-by: [email protected] > Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Simon Horman <[email protected]>