From: bot+bpf-ci@kernel.org
To: ahemadkhawar123@gmail.com,bpf@vger.kernel.org,netdev@vger.kernel.org,linux-kernel@vger.kernel.org,magnus.karlsson@intel.com,maciej.fijalkowski@intel.com,sdf@fomichev.me,ast@kernel.org,daniel@iogearbox.net,hawk@kernel.org,john.fastabend@gmail.com,kuba@kernel.org,pabeni@redhat.com,edumazet@google.com,horms@kernel.org,syzbot+aa48b5fe7bfda62d1682@syzkaller.appspotmail.com
Cc: ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,clm@meta.com,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v2] xsk: Fix circular locking dependency in xsk_notifier
Date: Wed, 26 Aug 2026 17:41:14 +0000 (UTC) [thread overview]
Message-ID: <d69c13a8e271e1bc257c5642ca6a378c0dc04a9400be37a5c9a429b0bda3be19@mail.kernel.org> (raw)
In-Reply-To: <20260826162110.99879-1-ahemadkhawar123@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]
> xsk: Fix circular locking dependency in xsk_notifier
>
> syzbot reported a circular locking dependency involving &net->xdp.lock,
> &xs->mutex, and netdev_lock_ops():
>
> -> #2 (&net->xdp.lock):
> xsk_notifier
> unregister_netdevice_many_notify
>
> -> #1 (&xs->mutex):
> xsk_diag_dump
>
> -> #0 (netdev_lock_ops):
> xsk_bind
Does this lockdep chain match the syzbot report? Looking at the cited
report (message ID 6a8c9fd9.dbb3a75c.7844.000c.GAE@google.com), it shows
a four-lock cycle, not three:
-> #3 (&net->xdp.lock)
xsk_notifier <- ipvlan_device_event <-
unregister_netdevice_many_notify <- rtnl_dellink
-> #2 (&port->pnodes_lock)
ipvlan_device_event
-> #1 (&dev_instance_lock_key#23)
netdev_lock_ops in xsk_bind+0x331 net/xdp/xsk.c:1627
-> #0 (&xs->mutex)
xsk_diag_fill net/xdp/xsk_diag.c:113 / xsk_diag_dump:166
Chain exists of:
&xs->mutex --> &port->pnodes_lock --> &net->xdp.lock
The report includes &port->pnodes_lock from drivers/net/ipvlan as a
load-bearing link in the chain, which this description omits entirely.
The lock numbering is also reversed. The report uses #3/#2/#1/#0 with
&xs->mutex as #0 (the lock being acquired that triggers the warning),
whereas the commit message renumbers them as #2/#1/#0 and places
netdev_lock_ops as #0 instead.
The causal analysis seems inconsistent too. The commit message states
"In xsk_notifier(), xp_clear_dev() was called while holding &xs->mutex...
this created a nested dependency of &xs->mutex -> netdev_lock_ops."
However, the report attributes the &xs->mutex -> netdev_lock edge to
xsk_bind(), not xsk_notifier(). The report's #1 entry shows:
-> #1 (&dev_instance_lock_key#23){+.+.}-{4:4}:
netdev_lock include/linux/netdevice.h:2861 [inline]
netdev_lock_ops include/net/netdev_lock.h:42 [inline]
xsk_bind+0x331/0x11d0 net/xdp/xsk.c:1627
Could the commit message be revised to accurately describe the lockdep
chain from the cited report, including all four locks and the correct
code paths that create each dependency?
---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
CI run summary: https://github.com/kernel-patches/bpf/actions/runs/32990621157
prev parent reply other threads:[~2026-08-26 17:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 16:21 Khawar Ahemad
2026-08-26 17:41 ` bot+bpf-ci [this message]
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=d69c13a8e271e1bc257c5642ca6a378c0dc04a9400be37a5c9a429b0bda3be19@mail.kernel.org \
--to=bot+bpf-ci@kernel.org \
--cc=ahemadkhawar123@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=ihor.solodrai@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=martin.lau@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=syzbot+aa48b5fe7bfda62d1682@syzkaller.appspotmail.com \
--cc=yonghong.song@linux.dev \
/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
all inboxes | Powered by JetHome®