]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/vma: Correctly position vma_iterator in __split_vma()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 9 Aug 2024 18:19:19 +0000 (14:19 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 20 Aug 2024 15:34:43 +0000 (11:34 -0400)
commit164421d9f7cf922ff92736be2150a789514bcbba
tree63b2231910bc5051ef39d04955060495ec11daaa
parentab77309d735e8437f6e47bd008e08b7b6a03280e
mm/vma: Correctly position vma_iterator in __split_vma()

The vma iterator may be left pointing to the newly created vma.  This
happens when inserting the new vma at the end of the old vma
(!new_below).

The incorrect position in the vma iterator is not exposed currently
since the vma iterator is repositioned in the munmap path and is not
reused in any of the other paths.

This has limited impact in the current code, but is required for future
changes.

Fixes: b2b3b886738f ("mm: don't use __vma_adjust() in __split_vma()")
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com>
mm/vma.c