Skip to contentSkip to conversation

RDMA/core: let rdma_connect_locked() call lockdep_assert_held(&id_priv->handler_mutex)

PATCH Applied Stefan Metzmacher 2 participants 2 messages Oct 8, 2025 – Oct 19, 2025 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/core: let rdma_connect_locked() call lockdep_assert_held(&id_priv->handler_mutex)

rdma_accept() also has this, so this is now more consistent and may prevent bugs in future.

---
 drivers/infiniband/core/cma.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/infiniband/core/cma.c +2 -0
index 5b2d3ae3f9fc..95e89f5c147c 100644
@@ -4475,6 +4475,8 @@ int rdma_connect_locked(struct rdma_cm_id *id,
 		container_of(id, struct rdma_id_private, id);
 	int ret;
 
+	lockdep_assert_held(&id_priv->handler_mutex);
+
 	if (!cma_comp_exch(id_priv, RDMA_CM_ROUTE_RESOLVED, RDMA_CM_CONNECT))
 		return -EINVAL;
 
Signature · 1 line
2.43.0