Re: [PATCH v3] mm/migrate_device: fix pgtable leak in migrate_vma_insert_huge_pmd_page
From: David Hildenbrand (Arm)
Date: Wed May 20 2026 - 01:29:44 EST
On 5/20/26 00:00, Andrew Morton wrote:
> On Sat, 2 May 2026 10:59:33 +1000 Balbir Singh <balbirs@xxxxxxxxxx> wrote:
>
>>>
>>> The issue can be reached if we try to migrate a non private/coherent folio (I assume DAX/P2PDMA)
>>> pages. Even migrate_vma_insert_page() has a similar pattern. Creating the pud/pmd/pte structure
>>> there is unnecessary (but not allocations occur, depends on pmd_none() for example), do we want
>>> to clean up all of it (need to think through)?
>>>
>>> I'll re-review and send fixes as needed. Looks like David sent some fixes out, will review
>>> those as well.
>>>
>>
>> I checked migrate_vma_insert_page() is no affected.
>>
>
> Thanks.
>
> What to do here. We have a cc:stable hotfix which is adequately tested and
> seems to have passed review. And a cleanup patch from David.
>
> I'm inclined to upstream this patch as-is and leave the cleanup on
> David's TODO list (one more can't make any difference ;))
No strong opinion from my side.
--
Cheers,
David