public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
To: linux-rdma@vger.kernel.org, leon@kernel.org, jgg@ziepe.ca,
	zyjzyj2000@gmail.com
Cc: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Subject: [PATCH for-next] RDMA/rxe: Fix incorrect return value of rxe_odp_atomic_op()
Date: Thu, 13 Mar 2025 15:45:40 +0900	[thread overview]
Message-ID: <20250313064540.2619115-1-matsuda-daisuke@fujitsu.com> (raw)

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


             reply	other threads:[~2025-03-13  6:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13  6:45 Daisuke Matsuda [this message]
2025-03-13 12:30 ` [PATCH for-next] RDMA/rxe: Fix incorrect return value of rxe_odp_atomic_op() Leon Romanovsky
2025-03-13 12:30 ` Leon Romanovsky
2025-03-13 12:36 ` Zhu Yanjun

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20250313064540.2619115-1-matsuda-daisuke@fujitsu.com \
    --to=matsuda-daisuke@fujitsu.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=zyjzyj2000@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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