]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/mmap: Fix __vma_adjust() memory leak.
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 27 Apr 2022 22:40:00 +0000 (18:40 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 27 Apr 2022 22:40:41 +0000 (18:40 -0400)
commit74f551227d44b351d56f4ec0a36542d871f337d5
tree668c45a935a9cfbcc3cfa4a96cc86278b4bc63b3
parent62c50b9683d10ccaa0b689459efaa41794db129b
mm/mmap: Fix __vma_adjust() memory leak.

When shifting the arg pages, the maple state may be left with allocated
memory.  Free the memory by calling mas_destroy() unconditionally at the
end of the function.

Fixes: bd6a1fd58daf (mm: start tracking VMAs with maple tree)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
mm/mmap.c