The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: syzbot <syzbot+a78926bdac2adb52dc0e@syzkaller.appspotmail.com>,
	davem@davemloft.net, edumazet@google.com, horms@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	pabeni@redhat.com, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] WARNING in netdev_queue_get_dma_dev
Date: Thu, 6 Aug 2026 13:03:19 +0100	[thread overview]
Message-ID: <6fb5da63-526f-450a-ae8d-6a7d97f1bcf4@gmail.com> (raw)
In-Reply-To: <20260805165817.7e1fc367@kernel.org>

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


  reply	other threads:[~2026-08-06 12:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 14:32 [syzbot] [net?] WARNING in netdev_queue_get_dma_dev syzbot
2026-08-04 21:00 ` Jakub Kicinski
2026-08-05  8:51   ` Pavel Begunkov
2026-08-05 23:58     ` Jakub Kicinski
2026-08-06 12:03       ` Pavel Begunkov [this message]
2026-08-05 13:24 ` [PATCH] io_uring/zcrx: reject netdevices without ops lock support pavankumaryalagada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6fb5da63-526f-450a-ae8d-6a7d97f1bcf4@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+a78926bdac2adb52dc0e@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox