[PATCH v2 4/6] mm/migrate: use huge_ptep_get() in remove_migration_pte()
David Hildenbrand (Arm)
david at kernel.org
Thu Jul 2 08:44:20 PDT 2026
On 7/2/26 07:13, Dev Jain wrote:
> remove_migration_pte() converts migration entries back to present PTEs
> after folio migration completes. For hugetlb folios,
> page_vma_mapped_walk() returns the pte pointer to the hugetlb folio in
> pvmw.pte, but the code reads it with ptep_get().
>
> On arches which provide their own huge_ptep_get() to dereference a huge
> pte pointer, accessing via ptep_get() would cause pte_pfn(),
> pte_present() etc to misbehave.
>
> It is not clear whether this has a trivially visible effect to userspace.
Right, for non-present entries it's even weirder. Fortunately your patch #1 also
handles that.
Acked-by: David Hildenbrand (Arm) <david at kernel.org>
--
Cheers,
David
More information about the linux-arm-kernel
mailing list