Commit 0edefddb authored by Bernard Metzler's avatar Bernard Metzler Committed by Jason Gunthorpe

RDMA/siw: Fix post_recv QP state locking

Do not release qp state lock if not previously acquired.

Fixes: cf049bb3 ("RDMA/siw: Fix SQ/RQ drain logic")
Link: https://lore.kernel.org/r/20191025142903.20625-1-bmt@zurich.ibm.comReported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 5212c3fd
...@@ -990,7 +990,6 @@ int siw_post_receive(struct ib_qp *base_qp, const struct ib_recv_wr *wr, ...@@ -990,7 +990,6 @@ int siw_post_receive(struct ib_qp *base_qp, const struct ib_recv_wr *wr,
} }
if (!qp->kernel_verbs) { if (!qp->kernel_verbs) {
siw_dbg_qp(qp, "no kernel post_recv for user mapped sq\n"); siw_dbg_qp(qp, "no kernel post_recv for user mapped sq\n");
up_read(&qp->state_lock);
*bad_wr = wr; *bad_wr = wr;
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment