public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/rxe: Fix an error handling path in rxe_bind_mw()
@ 2023-07-17 19:55 Christophe JAILLET
  2023-07-17 22:31 ` Bob Pearson
  2023-07-17 23:20 ` Zhu Yanjun
  0 siblings, 2 replies; 4+ messages in thread
From: Christophe JAILLET @ 2023-07-17 19:55 UTC (permalink / raw)
  To: Zhu Yanjun, Jason Gunthorpe, Leon Romanovsky, Bob Pearson
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-rdma

All errors go to the error handling path, except this one. Be consistent
and also branch to it.

Fixes: 02ed253770fb ("RDMA/rxe: Introduce rxe access supported flags")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
/!\ Speculative /!\

   This patch is based on analysis of the surrounding code and should be
   reviewed with care !

/!\ Speculative /!\
---
 drivers/infiniband/sw/rxe/rxe_mw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_mw.c b/drivers/infiniband/sw/rxe/rxe_mw.c
index d8a43d87de93..d9312b5c9d20 100644
--- a/drivers/infiniband/sw/rxe/rxe_mw.c
+++ b/drivers/infiniband/sw/rxe/rxe_mw.c
@@ -199,7 +199,8 @@ int rxe_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe)
 
 	if (access & ~RXE_ACCESS_SUPPORTED_MW) {
 		rxe_err_mw(mw, "access %#x not supported", access);
-		return -EOPNOTSUPP;
+		ret = -EOPNOTSUPP;
+		goto err_drop_mr;
 	}
 
 	spin_lock_bh(&mw->lock);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* Re: [PATCH] RDMA/rxe: Fix an error handling path in rxe_bind_mw()
@ 2023-07-18 12:30 Leon Romanovsky
  0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2023-07-18 12:30 UTC (permalink / raw)
  To: Zhu Yanjun, Jason Gunthorpe, Bob Pearson, Christophe JAILLET
  Cc: linux-kernel, kernel-janitors, linux-rdma


On Mon, 17 Jul 2023 21:55:56 +0200, Christophe JAILLET wrote:
> All errors go to the error handling path, except this one. Be consistent
> and also branch to it.
> 
> 

Applied, thanks!

[1/1] RDMA/rxe: Fix an error handling path in rxe_bind_mw()
      https://git.kernel.org/rdma/rdma/c/5c719d7aef298e

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-18 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 19:55 [PATCH] RDMA/rxe: Fix an error handling path in rxe_bind_mw() Christophe JAILLET
2023-07-17 22:31 ` Bob Pearson
2023-07-17 23:20 ` Zhu Yanjun
  -- strict thread matches above, loose matches on Subject: below --
2023-07-18 12:30 Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox