Re: [PATCH] mm/migrate_device: fix folio refcount leak on folio_split_unmapped failure

From: Usama Arif

Date: Fri Mar 06 2026 - 05:52:43 EST





>
> @Usama have you figured out where the original issue you are seeing stems from?
>

There was no issue or bug report. split_huge_pmd_address currently cannot fail.
I am making lazy page table allocation work [1], which would allow it to fail.
One of the review comments was if I need a folio_put if split_huge_pmd_address
fails. Its not needed if folio_split_unmapped fails, but is needed if
split_huge_pmd_address fails [2]. Actually it would be very nice if you could
review the patch in [1], as its modifying the code you wrote!

Thanks!

[1] https://lore.kernel.org/all/20260226113233.3987674-13-usama.arif@xxxxxxxxx/
[2] https://lore.kernel.org/all/6982e9fc-cc17-4d4f-b26e-83997c4bf070@xxxxxxxxx/

> Balbir
>
>