Commit 6f523709 authored by Anil Samal's avatar Anil Samal Committed by Leon Romanovsky
Browse files

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: c8f304d7 ("RDMA/irdma: Prevent QP use after free")
Signed-off-by: default avatarAnil Samal <anil.samal@intel.com>
Signed-off-by: default avatarTatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent c45c6ebd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -558,6 +558,7 @@ static int irdma_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)
	}

	irdma_qp_rem_ref(&iwqp->ibqp);
	if (!iwdev->rf->reset)
		wait_for_completion(&iwqp->free_qp);
	irdma_free_lsmm_rsrc(iwqp);
	irdma_cqp_qp_destroy_cmd(&iwdev->rf->sc_dev, &iwqp->sc_qp);