]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs/proc/task_mmu: fix PAGE_IS_PFNZERO detection for the huge zero folio
authorDavid Hildenbrand <david@redhat.com>
Tue, 17 Jun 2025 14:35:32 +0000 (16:35 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Jun 2025 22:55:03 +0000 (15:55 -0700)
commit4a5e85f4eb8fd18b1266342d100e4f0849544ca0
treede291e492f82add43cade7f1734a241039c971b3
parent78f4e737a53e1163ded2687a922fce138aee73f5
fs/proc/task_mmu: fix PAGE_IS_PFNZERO detection for the huge zero folio

is_zero_pfn() does not work for the huge zero folio. Fix it by using
is_huge_zero_pmd().

This can cause the PAGEMAP_SCAN ioctl against /proc/pid/pagemap to
present pages as PAGE_IS_PRESENT rather than as PAGE_IS_PFNZERO.

Found by code inspection.

Link: https://lkml.kernel.org/r/20250617143532.2375383-1-david@redhat.com
Fixes: 52526ca7fdb9 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs")
Signed-off-by: David Hildenbrand <david@redhat.com>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/task_mmu.c