archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <>
To: Zhu Yanjun <>, Bob Pearson <>
Cc: Doug Ledford <>,
	Jason Gunthorpe <>,,
Subject: [PATCH] RDMA/rxe: missing unlock on error in get_srq_wqe()
Date: Fri, 25 Jun 2021 16:03:06 +0300	[thread overview]
Message-ID: <YNXUCmnPsSkPyhkm@mwanda> (raw)

This error path needs to unlock before returning.

Fixes: ec0fa2445c18 ("RDMA/rxe: Fix over copying in get_srq_wqe")
Signed-off-by: Dan Carpenter <>
I'm sort of surprised this one wasn't caught in testing...

 drivers/infiniband/sw/rxe/rxe_resp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 72cdb170b67b..3743dc39b60c 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -314,6 +314,7 @@ static enum resp_states get_srq_wqe(struct rxe_qp *qp)
 	/* don't trust user space data */
 	if (unlikely(wqe->dma.num_sge > srq->rq.max_sge)) {
+		spin_unlock_bh(&srq->rq.consumer_lock);
 		pr_warn("%s: invalid num_sge in SRQ entry\n", __func__);

             reply	other threads:[~2021-06-25 13:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 13:03 Dan Carpenter [this message]
2021-06-25 13:11 ` [PATCH] RDMA/rxe: missing unlock on error in get_srq_wqe() Majd Dibbiny
2021-06-25 14:32 ` Bob Pearson
2021-06-25 14:33   ` Bob Pearson
2021-06-25 15:03 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YNXUCmnPsSkPyhkm@mwanda \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).