From: Bernard Metzler Date: Fri, 25 Oct 2019 14:29:03 +0000 (+0200) Subject: RDMA/siw: Fix post_recv QP state locking X-Git-Tag: v5.4.7~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=869aeb9a7063f22c1a0ef4df1805e5c965ee89fd;p=platform%2Fkernel%2Flinux-rpi.git RDMA/siw: Fix post_recv QP state locking [ Upstream commit 0edefddbae396e50eb7887d279d0c4bb4d7a6384 ] 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 Signed-off-by: Bernard Metzler Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c index 7d0a7ed..1b1a40d 100644 --- a/drivers/infiniband/sw/siw/siw_verbs.c +++ b/drivers/infiniband/sw/siw/siw_verbs.c @@ -988,7 +988,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; }