public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-next] RDMA/rxe: Break endless pagefault loop for RO pages
@ 2025-05-22 11:36 Leon Romanovsky
  2025-05-22 13:29 ` Daisuke Matsuda
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Leon Romanovsky @ 2025-05-22 11:36 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: Leon Romanovsky, Daisuke Matsuda, linux-rdma, Zhu Yanjun

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)) {
 			need_fault = true;
 			break;
 		}
-- 
2.49.0


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

end of thread, other threads:[~2025-05-23 12:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox