mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
RDMA/irdma: Initialize free_qp completion before using it
In irdma_create_qp, if ib_copy_to_udata fails, it will call
irdma_destroy_qp to clean up which will attempt to wait on
the free_qp completion, which is not initialized yet. Fix this
by initializing the completion before the ib_copy_to_udata call.
Fixes: b48c24c2d7 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: Jacob Moroni <jmoroni@google.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
0f2055db7b
commit
11a95521fb
|
|
@ -1105,6 +1105,7 @@ static int irdma_create_qp(struct ib_qp *ibqp,
|
|||
spin_lock_init(&iwqp->sc_qp.pfpdu.lock);
|
||||
iwqp->sig_all = init_attr->sq_sig_type == IB_SIGNAL_ALL_WR;
|
||||
rf->qp_table[qp_num] = iwqp;
|
||||
init_completion(&iwqp->free_qp);
|
||||
|
||||
if (udata) {
|
||||
/* GEN_1 legacy support with libi40iw does not have expanded uresp struct */
|
||||
|
|
@ -1129,7 +1130,6 @@ static int irdma_create_qp(struct ib_qp *ibqp,
|
|||
}
|
||||
}
|
||||
|
||||
init_completion(&iwqp->free_qp);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user