On 12/6/24 23:52, Suren Baghdasaryan wrote: > Current implementation does not set detached flag when a VMA is first > allocated. This does not represent the real state of the VMA, which is > detached until it is added into mm's VMA tree. Fix this by marking new > VMAs as detached and resetting detached flag only after VMA is added > into a tree. > Introduce vma_mark_attached() to make the API more readable and to > simplify possible future cleanup when vma->vm_mm might be used to > indicate detached vma and vma_mark_attached() will need an additional > mm parameter. > > Signed-off-by: Suren Baghdasaryan <surenb@xxxxxxxxxx> > Reviewed-by: Shakeel Butt <shakeel.butt@xxxxxxxxx> > Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx> Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>