mm/madvise: Fix VMA_ITERATOR start position
Subsystems (3)
PATCH 1/1 mm/madvise: Fix VMA_ITERATOR start position
From: Liam Howlett <[email protected]>
The WARN_ON() in vma_iter_store() detected an invalid VMA iterator state. Inspecting the code stack from the report shows that the VMA iterator is never set to the correct start position.
Setting the initialization of the VMA iterator to use the address 'start' fixes this issue.
Reported-by [email protected]
Signed-off-by Liam Howlett <[email protected]>
---
Andrew, this can be squashed into the mm-unstable ("madvise: use split_vma() instead of __split_vma()")
mm/madvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/madvise.c +1 -1
@@ -142,7 +142,7 @@ static int madvise_update_vma(struct vm_area_struct *vma,struct mm_struct *mm = vma->vm_mm;int error;pgoff_t pgoff; -VMA_ITERATOR (vmi, mm,0 ); +VMA_ITERATOR (vmi, mm, start);if (new_flags == vma->vm_flags &&anon_vma_name_eq (anon_vma_name (vma), anon_name)) { *prev = vma;
Signature · 1 line
2.39.0