Skip to content

nbd: reclassify socket lock in nbd_reconnect_socket#1038

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1122538=>linus-master
Open

nbd: reclassify socket lock in nbd_reconnect_socket#1038
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1122538=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown

Pull request for series with
subject: nbd: reclassify socket lock in nbd_reconnect_socket
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1122538

nbd_reconnect_socket() obtains a new socket via nbd_get_socket() but
does not call nbd_reclassify_socket(), leaving the socket's sk_lock in
the default AF_INET6 lockdep class.  This causes false circular lock
dependency warnings because lockdep merges the NBD socket's sk_lock
with unrelated sockets (e.g., rawv6_sendmsg) that establish a
sk_lock -> fs_reclaim dependency in normal operation.

nbd_add_socket() already reclassifies correctly on the initial connect
path, but the reconnect path was missed.

Add the missing nbd_reclassify_socket() call after nbd_get_socket() in
nbd_reconnect_socket().

Reported-by: syzbot+576095eed5658cbd9b63@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=576095eed5658cbd9b63
Fixes: d532cdd ("nbd: Reclassify sockets to avoid lockdep circular dependency")
Signed-off-by: Yun Zhou <yun.zhou@windriver.com>
@blktests-ci

blktests-ci Bot commented Jul 6, 2026

Copy link
Copy Markdown
Author

Upstream branch: 8cdeaa5
series: https://patchwork.kernel.org/project/linux-block/list/?series=1122538
version: 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant