From: Hillf Danton <hdanton@sina.com>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: Eric Dumazet <edumazet@google.com>,
syzbot <syzbot+2d770620059281e225a4@syzkaller.appspotmail.com>,
Nilay Shroff <nilay@linux.ibm.com>,
Keith Busch <kbusch@kernel.org>,
boqun@kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, peterz@infradead.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] WARNING: locking bug in tcp_tsq_handler
Date: Thu, 27 Aug 2026 20:31:53 +0800 [thread overview]
Message-ID: <20260827123155.1835-1-hdanton@sina.com> (raw)
In-Reply-To: <ao5BNjnM_pwcdk9X@shinhome>
On Wed, 26 Aug 2026 11:23:37 +0900 Shin'ichiro Kawasaki wrote:
>On Aug 25, 2026 / 16:27, Eric Dumazet wrote:
>> On Tue, Aug 25, 2026 at 3:53 PM Eric Dumazet <edumazet@google.com> wrote:
>> > I think you missed one problem in lib/once.c
>> >
>> > Revert commit e8eef69a99f1 (or restore once_disable_jump(once_key,
>> > mod) inside __do_once_sleepable_done())
>> > so static_branch_disable() is never called synchronously under caller locks.
>> >
>> > Previously, once_disable_jump() deferred static_branch_disable() to a
>> > worker thread via schedule_work().
>> >
>> > Commit e8eef69a99f1 made it run synchronously in the caller's context.
>> > Because __inet_hash_connect() is called under lock_sock(sk), calling
>> > static_branch_disable() directly inside DO_ONCE_SLEEPABLE() takes
>> > cpus_read_lock() (cpu_hotplug_lock) while holding lock_sock(sk).
>> >
>> > This created the bogus lock dependency sk_lock -> cpu_hotplug_lock.
>> >
>> > Every other storage/networking client (sunrpc, nbd, cifs, iscsi_tcp,
>> > rxe, siw) uses static lockdep keys (static struct lock_class_key
>> > ...[2]) without issue.
>>
>> I sent the revert request for review :
>> https://lore.kernel.org/lkml/20260825142515.1965654-1-edumazet@google.com/T/#u
>
> Thank you for the clarification. Now I have better understanding.
>
> When I looked at the lock dependency chain among six locks below, I assumed
> that any of the dependencies could not be cut.
>
> set->srcu -> sk_lock -> cpu_hotplug_lock -> fs_reclaim -> q_usage_counter -> elevator_lock -> set->srcu
>
> So I thought that the idea to introduce the dynamic lockdep key for nvme-tcp
> sk_lock instances would be the only one solution. But you pointed out that the
> dependency sk_lock -> cpu_hotplug_lock can be cut by reverting the commit
> e8eef69a99f1.
>
> I did trial and confirmed that your suggestion works. With the kerenl v7.2 +
> revert 19bdb70c77d3 + revert e8eef69a99f1, I confirmed the blktests test case
> nvme/005 passed with tcp transport. The lockdep WARN due to the six locks goes
> away. Great :)
>
Reverting e8eef69a99f1 alone failed to survive the syzbot test [15].
Nor did Eric's change [16] to lockdep alone [17].
Nor did Eric's change [16] to lockdep after Reverting e8eef69a99f1 [18].
[15] Subject: Re: [syzbot] [kernfs?] possible deadlock in kernfs_link_sibling (2)
https://lore.kernel.org/lkml/6a90125e.1d9ded08.62e62.00d0.GAE@google.com/
[16] Subject: [PATCH] locking/lockdep: Invalidate stale class_cache entries for zapped classes
https://lore.kernel.org/lkml/20260824155129.676096-1-edumazet@google.com/
[17] Subject: Re: [syzbot] [net?] WARNING: locking bug in tcp_tsq_handler
https://lore.kernel.org/lkml/6a8fa86e.27659fcc.2ceef7.000c.GAE@google.com/
[18] Subject: Re: [syzbot] [kernfs?] possible deadlock in kernfs_link_sibling (2)
https://lore.kernel.org/lkml/6a8fd74f.4d659fcc.734b4.000c.GAE@google.com/
WTF root cause is Eric attempting to fix?
next prev parent reply other threads:[~2026-08-27 12:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 15:51 [PATCH] locking/lockdep: Invalidate stale class_cache entries for zapped classes Eric Dumazet
2026-08-25 0:29 ` Hillf Danton
2026-08-25 0:59 ` [syzbot] [net?] WARNING: locking bug in tcp_tsq_handler syzbot
2026-08-25 1:25 ` Hillf Danton
2026-08-25 1:27 ` Eric Dumazet
2026-08-25 1:50 ` Eric Dumazet
2026-08-25 5:44 ` Shin'ichiro Kawasaki
2026-08-25 6:25 ` Hillf Danton
2026-08-25 6:45 ` Hillf Danton
2026-08-25 13:26 ` Shin'ichiro Kawasaki
2026-08-25 13:53 ` Eric Dumazet
2026-08-25 14:27 ` Eric Dumazet
2026-08-26 2:23 ` Shin'ichiro Kawasaki
2026-08-27 12:31 ` Hillf Danton [this message]
2026-08-26 3:06 ` Hillf Danton
2026-08-26 4:05 ` Eric Dumazet
2026-08-26 10:27 ` Hillf Danton
2026-08-26 10:49 ` Eric Dumazet
2026-08-26 11:49 ` Hillf Danton
2026-08-28 9:00 ` Hillf Danton
2026-08-25 13:08 ` Shin'ichiro Kawasaki
-- strict thread matches above, loose matches on Subject: below --
2026-08-24 15:44 syzbot
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=20260827123155.1835-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=boqun@kernel.org \
--cc=edumazet@google.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nilay@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=shinichiro.kawasaki@wdc.com \
--cc=syzbot+2d770620059281e225a4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.