From: Leon Romanovsky <leon@kernel.org>
To: Zhu Yanjun <yanjun.zhu@linux.dev>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
Daisuke Matsuda <dskmtsd@gmail.com>,
linux-rdma@vger.kernel.org, Zhu Yanjun <zyjzyj2000@gmail.com>
Subject: Re: [PATCH rdma-next] RDMA/rxe: Break endless pagefault loop for RO pages
Date: Thu, 22 May 2025 19:07:04 +0300 [thread overview]
Message-ID: <20250522160704.GS7435@unreal> (raw)
In-Reply-To: <bb5dcd1c-669a-4e23-8b41-4dc018331b82@linux.dev>
On Thu, May 22, 2025 at 05:40:38PM +0200, Zhu Yanjun wrote:
> 在 2025/5/22 13:36, Leon Romanovsky 写道:
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > RO pages has "perm" equal to 0, that caused to the situation
> > where such pages were marked as needed to have fault and caused
> > to infinite loop.
> >
> > Fixes: eedd5b1276e7 ("RDMA/umem: Store ODP access mask information in PFN")
> > Reported-by: Daisuke Matsuda <dskmtsd@gmail.com>
> > Closes: https://lore.kernel.org/all/3e8f343f-7d66-4f7a-9f08-3910623e322f@gmail.com
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.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 a1416626f61a5..0f67167ddddd1 100644
> > --- a/drivers/infiniband/sw/rxe/rxe_odp.c
> > +++ b/drivers/infiniband/sw/rxe/rxe_odp.c
> > @@ -137,7 +137,7 @@ static inline bool rxe_check_pagefault(struct ib_umem_odp *umem_odp,
> > while (addr < iova + length) {
> > idx = (addr - ib_umem_start(umem_odp)) >> umem_odp->page_shift;
> > - if (!(umem_odp->map.pfn_list[idx] & perm)) {
> > + if (!(umem_odp->map.pfn_list[idx] & HMM_PFN_VALID)) {
>
> Because perm is not used, it is not necessary to calculate and pass perm to
> rxe_check_pagefault. The cleanup is as below:
Thanks a lot, I folded this cleanup to the fix.
prev parent reply other threads:[~2025-05-22 16:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 11:36 [PATCH rdma-next] RDMA/rxe: Break endless pagefault loop for RO pages Leon Romanovsky
2025-05-22 13:29 ` Daisuke Matsuda
2025-05-22 13:37 ` Leon Romanovsky
2025-05-22 13:42 ` Leon Romanovsky
2025-05-23 12:15 ` Zhu Yanjun
2025-05-23 12:57 ` Daisuke Matsuda
2025-05-22 13:35 ` Leon Romanovsky
2025-05-22 15:40 ` Zhu Yanjun
2025-05-22 16:07 ` Leon Romanovsky [this message]
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=20250522160704.GS7435@unreal \
--to=leon@kernel.org \
--cc=dskmtsd@gmail.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=yanjun.zhu@linux.dev \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.