public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/rxe: Fix incorrect return value of rxe_odp_atomic_op()
@ 2025-03-13  6:45 Daisuke Matsuda
  2025-03-13 12:30 ` Leon Romanovsky
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daisuke Matsuda @ 2025-03-13  6:45 UTC (permalink / raw)
  To: linux-rdma, leon, jgg, zyjzyj2000; +Cc: Daisuke Matsuda

rxe_mr_do_atomic_op() returns enum resp_states numbers, so the ODP
counterpart must not return raw errno codes.

Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
---
 drivers/infiniband/sw/rxe/rxe_odp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_odp.c b/drivers/infiniband/sw/rxe/rxe_odp.c
index 94f7bbe14981..9f6e2bb2a269 100644
--- a/drivers/infiniband/sw/rxe/rxe_odp.c
+++ b/drivers/infiniband/sw/rxe/rxe_odp.c
@@ -316,7 +316,7 @@ int rxe_odp_atomic_op(struct rxe_mr *mr, u64 iova, int opcode,
 	err = rxe_odp_map_range_and_lock(mr, iova, sizeof(char),
 					 RXE_PAGEFAULT_DEFAULT);
 	if (err < 0)
-		return err;
+		return RESPST_ERR_RKEY_VIOLATION;
 
 	err = rxe_odp_do_atomic_op(mr, iova, opcode, compare, swap_add,
 				   orig_val);
-- 
2.43.0


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

end of thread, other threads:[~2025-03-13 12:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-13  6:45 [PATCH for-next] RDMA/rxe: Fix incorrect return value of rxe_odp_atomic_op() Daisuke Matsuda
2025-03-13 12:30 ` Leon Romanovsky
2025-03-13 12:30 ` Leon Romanovsky
2025-03-13 12:36 ` Zhu Yanjun

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