[PATCH] mm/memory_failure: reject unsupported non-folio compound p=

From: Zi Yan

Date: Wed Feb 04 2026 - 16:04:19 EST


Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
---
mm/memory-failure.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 825c706ac576..4ed903de9a0e 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2440,9 +2440,12 @@ int memory_failure(unsigned long pfn, int flags)

folio =3D page_folio(p);

- /* filter pages that are protected from hwpoison test by users */
+ /*
+ * filter pages that are protected from hwpoison test by users
+ * or unsupported non folio compound pages
+ */
folio_lock(folio);
- if (hwpoison_filter(p)) {
+ if (hwpoison_filter(p) || !folio_test_large_rmappable(folio)) {
ClearPageHWPoison(p);
folio_unlock(folio);
folio_put(folio);
--=20
2.51.0



Best Regards,
Yan, Zi