From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Jason Gunthorpe <jgg@nvidia•com>, Leon Romanovsky <leonro@nvidia•com>
Cc: Daisuke Matsuda <matsuda-daisuke@fujitsu•com>,
Jason Gunthorpe <jgg@ziepe•ca>, Leon Romanovsky <leon@kernel•org>,
Li Zhijian <lizhijian@fujitsu•com>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the rdma tree with Linus' tree
Date: Tue, 22 Apr 2025 14:30:19 +1000 [thread overview]
Message-ID: <20250422143019.500201bd@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2566 bytes --]
Hi all,
Today's linux-next merge of the rdma tree got conflicts in:
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_resp.c
between commit:
1b2fe85f3cf1 ("RDMA/rxe: Fix null pointer dereference in ODP MR check")
from Linus' tree and commits:
6703cb3dced0 ("RDMA/rxe: Enable ODP in RDMA FLUSH operation")
b84001ad0cee ("RDMA/rxe: Enable ODP in ATOMIC WRITE operation")
from the rdma tree.
I fixed it up (see below - and some changed code from the latter was
removed in the former) and can carry the fix as necessary. This is now
fixed as far as linux-next is concerned, but any non trivial conflicts
should be mentioned to your upstream maintainer when your tree is
submitted for merging. You may also want to consider cooperating with
the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/infiniband/sw/rxe/rxe_mr.c
index 432d864c3ce9,1a74013a14ab..000000000000
--- a/drivers/infiniband/sw/rxe/rxe_mr.c
+++ b/drivers/infiniband/sw/rxe/rxe_mr.c
@@@ -468,6 -458,28 +458,28 @@@ static int rxe_mr_flush_pmem_iova(struc
return 0;
}
+ int rxe_flush_pmem_iova(struct rxe_mr *mr, u64 start, unsigned int length)
+ {
+ int err;
+
+ /* mr must be valid even if length is zero */
+ if (WARN_ON(!mr))
+ return -EINVAL;
+
+ if (length == 0)
+ return 0;
+
+ if (mr->ibmr.type == IB_MR_TYPE_DMA)
+ return -EFAULT;
+
- if (mr->umem->is_odp)
++ if (is_odp_mr(mr))
+ err = rxe_odp_flush_pmem_iova(mr, start, length);
+ else
+ err = rxe_mr_flush_pmem_iova(mr, start, length);
+
+ return err;
+ }
+
/* Guarantee atomicity of atomic operations at the machine level. */
DEFINE_SPINLOCK(atomic_ops_lock);
diff --cc drivers/infiniband/sw/rxe/rxe_resp.c
index 5d9174e408db,fd7bac5bce18..000000000000
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@@ -753,7 -749,16 +749,16 @@@ static enum resp_states atomic_write_re
value = *(u64 *)payload_addr(pkt);
iova = qp->resp.va + qp->resp.offset;
- err = rxe_mr_do_atomic_write(mr, iova, value);
+ /* See IBA oA19-28 */
+ if (unlikely(mr->state != RXE_MR_STATE_VALID)) {
+ rxe_dbg_mr(mr, "mr not in valid state\n");
+ return RESPST_ERR_RKEY_VIOLATION;
+ }
+
- if (mr->umem->is_odp)
++ if (is_odp_mr(mr))
+ err = rxe_odp_do_atomic_write(mr, iova, value);
+ else
+ err = rxe_mr_do_atomic_write(mr, iova, value);
if (err)
return err;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2025-04-22 4:30 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 4:30 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-09-11 2:23 linux-next: manual merge of the rdma tree with Linus' tree Stephen Rothwell
2025-09-11 11:03 ` Leon Romanovsky
2025-05-14 2:24 Stephen Rothwell
2025-05-14 8:17 ` Leon Romanovsky
2025-03-20 1:08 Stephen Rothwell
2025-03-20 6:35 ` Leon Romanovsky
2025-01-06 0:13 Stephen Rothwell
2025-01-14 20:48 ` Jason Gunthorpe
2025-01-14 21:27 ` Stephen Rothwell
2025-01-15 0:41 ` Jason Gunthorpe
2025-01-15 1:07 ` Stephen Rothwell
2025-01-15 11:17 ` Bernard Metzler
2025-01-05 23:51 Stephen Rothwell
2025-01-06 1:02 ` Stephen Rothwell
2025-01-06 14:16 ` Zhu Yanjun
2023-06-22 1:52 Stephen Rothwell
2021-05-21 0:34 Stephen Rothwell
2021-04-15 2:05 Stephen Rothwell
2021-02-10 2:15 Stephen Rothwell
2021-02-10 18:57 ` Pearson, Robert B
2021-02-10 20:36 ` Jason Gunthorpe
2021-02-10 22:08 ` Pearson, Robert B
2021-02-11 20:03 ` Martin Wilck
2019-11-05 1:17 Stephen Rothwell
2019-11-05 2:21 ` Jason Gunthorpe
2019-11-05 2:28 ` Stephen Rothwell
2019-10-24 0:01 Stephen Rothwell
2019-10-28 19:30 ` Jason Gunthorpe
2019-06-20 2:10 Stephen Rothwell
2019-06-20 3:25 ` Doug Ledford
2019-06-20 2:06 Stephen Rothwell
2019-06-20 3:24 ` Doug Ledford
2019-06-14 3:00 Stephen Rothwell
2019-06-14 13:11 ` Doug Ledford
2018-09-28 0:01 Stephen Rothwell
2018-09-29 2:57 ` Parav Pandit
2018-08-06 2:01 Stephen Rothwell
2018-08-06 19:41 ` Jason Gunthorpe
2018-08-06 21:49 ` Stephen Rothwell
2017-08-08 2:11 Stephen Rothwell
2017-07-14 1:14 Stephen Rothwell
2017-07-14 1:17 ` Doug Ledford
2017-07-14 3:34 ` Leon Romanovsky
2017-07-14 3:50 ` Stephen Rothwell
2017-07-14 4:55 ` Leon Romanovsky
2017-07-14 12:03 ` Doug Ledford
2017-07-14 13:46 ` Leon Romanovsky
2017-07-14 4:12 ` Doug Ledford
2017-07-14 4:54 ` Leon Romanovsky
2017-07-14 14:33 ` Doug Ledford
2017-07-14 15:10 ` Leon Romanovsky
2016-12-15 0:47 Stephen Rothwell
2016-10-10 0:59 Stephen Rothwell
2016-10-10 0:54 Stephen Rothwell
2016-08-05 1:05 Stephen Rothwell
2016-08-05 1:01 Stephen Rothwell
2016-08-05 0:52 Stephen Rothwell
2016-05-19 1:45 Stephen Rothwell
2016-03-22 0:33 Stephen Rothwell
2016-03-22 0:29 Stephen Rothwell
2016-03-22 0:24 Stephen Rothwell
2016-03-22 0:17 Stephen Rothwell
2015-11-01 7:48 Stephen Rothwell
2015-11-02 10:40 ` Sagi Grimberg
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=20250422143019.500201bd@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=jgg@nvidia$(echo .)com \
--cc=jgg@ziepe$(echo .)ca \
--cc=leon@kernel$(echo .)org \
--cc=leonro@nvidia$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=lizhijian@fujitsu$(echo .)com \
--cc=matsuda-daisuke@fujitsu$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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