[PATCH RFC 0/2] RDMA/cma, nvmet-rdma: fix a lockdep WARN
Shin'ichiro Kawasaki
shinichiro.kawasaki at wdc.com
Sun Nov 8 04:01:52 PST 2026
Since the commit 2a8513091d2f ("nvme-rdma: parallelize I/O queue
allocation and startup"), the blktests test cases nvme/004 and nvme/031
often fails with rdma transport due to a lockdep WARN, which is a false-
positive. Please refer to the first patch for the details of the WARN.
This series addresses the failure by reclassifying the handler_mutex of
the port listening cm_id. The first patch introduces
rdma_reclassify_id_for_listen() to RDMA/cma, which sets a dedicated
lockdep class to the handler_mutex of the specified cm_id. The second
patch calls it from nvmet-rdma for the port listening cm_id.
I made this series as RFC, because I was not so sure whether adding a
new function is the best approach. Another idea was to add a new
argument to rdma_create_id() to tell the cm_id created is for listen
of not, but it will touch a number of drivers. Yet another idea was to
add another work in nvmet-rdma to defer the connection establishment
[1], but adding a new work for the false-positive WARN is not desirable.
Then I think this patch series is the best solution at this moment.
Any comments will be welcomed. Thanks.
[1] https://lore.kernel.org/linux-nvme/at36um4zrsfOr3kh@shinmob/
Shin'ichiro Kawasaki (2):
RDMA/cma: Add rdma_reclassify_id_for_listen()
nvmet-rdma: use a separate lockdep class for the listening cm_id
drivers/infiniband/core/cma.c | 13 +++++++++++++
drivers/nvme/target/rdma.c | 2 ++
include/rdma/rdma_cm.h | 6 ++++++
3 files changed, 21 insertions(+)
--
2.56.0
More information about the Linux-nvme
mailing list