Re: [syzbot] [net?] WARNING in netdev_queue_get_dma_dev

From: Pavel Begunkov

Date: Thu Aug 06 2026 - 08:05:52 EST


On 8/6/26 00:58, Jakub Kicinski wrote:
On Wed, 5 Aug 2026 09:51:10 +0100 Pavel Begunkov wrote:
On 8/4/26 22:00, Jakub Kicinski wrote:
Hi Pavel, could you TAL?

It complains on not holding rtnl, so the netdev should be not
qops-enabled, and we acquire it with netdev_get_by_index_lock().
It's going to be rejected later, but not sure whether netdev->lock
protects its device and leasing logic well in this case.

Hm, I see.
As a quick fix, let's fail it early in zcrx if there is no qops.

I think we can switch the lockdep check in netdev_queue_get_dma_dev()
to netdev_assert_locked(dev)? Nothing should be calling that function
under rtnl_lock so the _compat() is a brainfart.

The assert was useful in this report, i.e. flagged difference in locking
expectation at least for me. I was thinking maybe
netdev_queue_get_dma_dev() should fail. Or maybe even
netdev_get_by_index_lock() is the problem; it's odd for it to
return w/o rtnl lock with a device that expects it, but perhaps
I don't know what dev->lock synchronises for !netdev_need_ops_lock()
cases.

In either case, I'd just fix it for 7.2 for now and defer figuring
sth nicer for later.

fwiw, devmem tcp seems to be fine as netdev_can_create_queue()
should check it.

--
Pavel Begunkov