Skip to content

Commit 6f52370

Browse files
ansamalintelrleon
authored andcommitted
RDMA/irdma: Fix deadlock during netdev reset with active connections
Resolve deadlock that occurs when user executes netdev reset while RDMA applications (e.g., rping) are active. The netdev reset causes ice driver to remove irdma auxiliary driver, triggering device_delete and subsequent client removal. During client removal, uverbs_client waits for QP reference count to reach zero while cma_client holds the final reference, creating circular dependency and indefinite wait in iWARP mode. Skip QP reference count wait during device reset to prevent deadlock. Fixes: c8f304d ("RDMA/irdma: Prevent QP use after free") Signed-off-by: Anil Samal <[email protected]> Signed-off-by: Tatyana Nikolova <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent c45c6eb commit 6f52370

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/infiniband/hw/irdma/verbs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,8 @@ static int irdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)
558558
}
559559

560560
irdma_qp_rem_ref(&iwqp->ibqp);
561-
wait_for_completion(&iwqp->free_qp);
561+
if (!iwdev->rf->reset)
562+
wait_for_completion(&iwqp->free_qp);
562563
irdma_free_lsmm_rsrc(iwqp);
563564
irdma_cqp_qp_destroy_cmd(&iwdev->rf->sc_dev, &iwqp->sc_qp);
564565

0 commit comments

Comments
 (0)