aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernard Metzler <bmt@zurich.ibm.com>2019-10-25 16:29:03 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-10-28 14:34:33 -0300
commit0edefddbae396e50eb7887d279d0c4bb4d7a6384 (patch)
tree2f6c924a6bcb31534848e22e5e9fd81e96070f8f
parentRDMA/iw_cxgb4: Report correct port speed/width (diff)
downloadlinux-dev-0edefddbae396e50eb7887d279d0c4bb4d7a6384.tar.xz
linux-dev-0edefddbae396e50eb7887d279d0c4bb4d7a6384.zip
RDMA/siw: Fix post_recv QP state locking
Do not release qp state lock if not previously acquired. Fixes: cf049bb31f71 ("RDMA/siw: Fix SQ/RQ drain logic") Link: https://lore.kernel.org/r/20191025142903.20625-1-bmt@zurich.ibm.com Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--drivers/infiniband/sw/siw/siw_verbs.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c
index c0574ddc98fa..726a5924ea13 100644
--- a/drivers/infiniband/sw/siw/siw_verbs.c
+++ b/drivers/infiniband/sw/siw/siw_verbs.c
@@ -990,7 +990,6 @@ int siw_post_receive(struct ib_qp *base_qp, const struct ib_recv_wr *wr,
}
if (!qp->kernel_verbs) {
siw_dbg_qp(qp, "no kernel post_recv for user mapped sq\n");
- up_read(&qp->state_lock);
*bad_wr = wr;
return -EINVAL;
}