]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/mmap: Correctly position vma_iterator in __split_vma()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 19 Apr 2024 13:57:51 +0000 (09:57 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 7 Jun 2024 14:32:18 +0000 (10:32 -0400)
commit049717ab2cdd4bcf36285915fb7440a563ed00f3
tree7d1af2f1f52861ab9bda26c3dd777cc4128889d4
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
mm/mmap: 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>
mm/mmap.c