]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/memory-failure: reject unsupported non-folio compound page
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 5 Feb 2026 07:53:28 +0000 (15:53 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 5 Feb 2026 22:10:00 +0000 (14:10 -0800)
commitae9fd76c111bb4a5293c2831a1ad373605251dd6
tree2421a17847cff8322e571289a99b88a0f473a618
parentb5cbacd7f86f4f62b8813688c8e73be94e8e1951
mm/memory-failure: reject unsupported non-folio compound page

When !CONFIG_TRANSPARENT_HUGEPAGE, a non-folio compound page can appear in
a userspace mapping via either vm_insert_*() functions or
vm_operatios_struct->fault().  They are not folios, thus should not be
considered for folio operations like split.  To reject these pages, make
sure get_hwpoison_page() is always called as HWPoisonHandlable() will do
the right work.

[Some commit log borrowed from Zi Yan. Thanks.]

Link: https://lkml.kernel.org/r/20260205075328.523211-1-linmiaohe@huawei.com
Fixes: 689b8986776c ("mm/memory-failure: improve large block size folio handling")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reported-by: 是参差 <shicenci@gmail.com>
Closes: https://lore.kernel.org/all/PS1PPF7E1D7501F1E4F4441E7ECD056DEADAB98A@PS1PPF7E1D7501F.apcprd02.prod.outlook.com/
Reviewed-by: Zi Yan <ziy@nvidia.com>
Tested-by: Zi Yan <ziy@nvidia.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jane Chu <jane.chu@oracle.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c