Re: [PATCH v3 10/16] mm: replace pmd_to_swp_entry() with softleaf_from_pmd()

Lorenzo Stoakes
2025-11-21T19:24:47Z

Hi Andrew,

One small mistake on this patch as discovered by Vlasta, fix-patch attached!

Thanks, Lorenzo

----8<----
From 0fbf3f749d378153533f041d1be27dd498dad3a1 Mon Sep 17 00:00:00 2001
From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Date: Fri, 21 Nov 2025 19:20:57 +0000
Subject: [PATCH] mm/page_table_check: fix device private check

We should check writable, not readable/writable.

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
---
mm/page_table_check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_table_check.c b/mm/page_table_check.c
index 9af1ecff5221..741884645ab0 100644
--- a/mm/page_table_check.c
+++ b/mm/page_table_check.c
@@ -181,7 +181,7 @@ EXPORT_SYMBOL(__page_table_check_pud_clear);
/* Whether the swap entry cached writable information */
static inline bool softleaf_cached_writable(softleaf_t entry)
{
- return softleaf_is_device_private(entry) ||
+ return softleaf_is_device_private_write(entry) ||
softleaf_is_migration_write(entry);
}

--
2.51.2