[PATCH 0/2] nvme-tcp: do not use dynamic lockdep key for socket instances

Shin'ichiro Kawasaki shinichiro.kawasaki at opensource.wdc.com
Mon Sep 14 00:48:51 PDT 2026


From: Shin'ichiro Kawasaki <shinichiro.kawasaki at wdc.com>

Keith and the maintainers, please consider this series for upstream.
The commit 19bdb70c77d3 tried to avoid a lockdep WARN issue, but it
was imperfect. With Eric's help, I propose this series as a better
solution.

Eric, FYI, I prepared the second patch with your authorship and your
SoB tag. Thanks for the fix idea.


Commit 19bdb70c77d3 ("nvme-tcp: lockdep: use dynamic lockdep keys per
socket instance") introduced the dynamic lockdep key to avoid a lockdep
WARN. However, it had a bug in lockdep key lifetime management and
caused another WARN [1]. The first patch in this series reverts the
commit to avoid the WARN.

Reverting 19bdb70c77d3 re-exposes two lockdep WARNs that it had
suppressed. The first one was observed with the blktests test case
nvme/005, which was caused by the lock chain below:

  set->srcu -> sk_lock -> cpu_hotplug_lock -> fs_reclaim -> q_usage_counter -> elevator_lock -> set->srcu

This WARN needs no patch in this series: it is already cut by the merged
commit 0ba6912f7e97 by Eric in the v7.3-rc2 tag, which removes the
"sk_lock -> cpu_hotplug_lock" dependency. This series therefore depends
on that commit being present.

The second WARN was observed with the blktests test case nvme/062, which
was caused by the dependency newly added for TLS support. The second
patch in this series delays the socket reclassification timing to cut
the dependency.

With this series applied on v7.3-rc2, nvme/005 and nvme/062 pass with no
lockdep splat.

[1] https://lore.kernel.org/lkml/CANn89i+wnTLC==UnXCpjsS4YxvEfhe5oK0N7fttbqr1zKyqdug@mail.gmail.com/


Eric Dumazet (1):
  nvme-tcp: delay nvme_tcp_reclassify_socket()

Shin'ichiro Kawasaki (1):
  Revert "nvme-tcp: lockdep: use dynamic lockdep keys per socket
    instance"

 drivers/nvme/host/tcp.c | 39 +++++++++++++--------------------------
 1 file changed, 13 insertions(+), 26 deletions(-)

-- 
2.54.0




More information about the Linux-nvme mailing list