]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/mmap: Fix leak on expand_downwards() and expand_upwards()
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 12 May 2022 17:53:29 +0000 (13:53 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 13 May 2022 14:43:31 +0000 (10:43 -0400)
commit1d05aa19422a907949a5f7e46b06998f181075e1
tree5f6d3fa5e455b054ed3f5d1e02091f4229ddfc5f
parent2273b38aaef7d886242792af7ab547d440e3753a
mm/mmap: Fix leak on expand_downwards() and expand_upwards()

A memory leak is possible in the race and error path in both
expand_downwards() and expand_upwards() due to the maple tree
preallocations.  Fix these by always destroying the maple state.

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