Re: [PATCH 03/13] fs/proc: use softleaf_has_pfn() in pagemap PMD walker

From: David Hildenbrand (Arm)

Date: Wed May 13 2026 - 10:44:33 EST


On 4/27/26 12:01, Usama Arif wrote:
> pagemap_pmd_range_thp() assumes that every non-present PMD is a
> migration entry and unconditionally calls softleaf_to_page(). This
> will crash on any non-present PMD type that does not encode a PFN,
> such as the upcoming PMD-level swap entries.
>
> Guard the page lookup with softleaf_has_pfn(), matching how
> pte_to_pagemap_entry() already handles non-present PTEs.
>
> Signed-off-by: Usama Arif <usama.arif@xxxxxxxxx>
> ---

Yes, just like pte_to_pagemap_entry() does

Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David