Re: [PATCH] mm: prepare anon_vma before swapin rmap

Lorenzo Stoakes
2026-04-18T09:35:47Z

On Fri, Apr 17, 2026 at 01:57:59PM +0200, David Hildenbrand (Arm) wrote:
> Maybe there was a scenario where we could have lost vma->anon_vma during
> a merge, resulting in a swapped page in an anon_vma.

Unless there's a bug (and correct me if I'm misinterpreting), VMA merge requires
vma->anon_vma to either be equal for merged adjacent VMAs, or one or the other
VMA to have NULL vma->anon_vma, in which case we set vma->anon_vma in the merged
VMA.

Thanks, Lorenzo