Re: [PATCH v4 02/12] mm/rmap: Add try_to_unmap_hugetlb_one

From: David Hildenbrand (Arm)

Date: Thu Jun 18 2026 - 03:55:22 EST


> return __rste_to_pte(pte_val(*ptep));
> }
>
>>> + VM_WARN_ON(!pte_present(pteval));
>>> + subpage = folio_page(folio, pte_pfn(pteval) - folio_pfn(folio));
>>
>> No need for subpages.
>
> So plain ptep_get() can feed raw huge-entry bits into pte_pfn(), and the
> derived subpage can be wrong.

Good question which impact that might have in practice?

--
Cheers,

David