]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: Fix memory leak when two threads race
authorMatthew Wilcox <willy@infradead.org>
Wed, 5 Dec 2018 20:43:27 +0000 (15:43 -0500)
committerMatthew Wilcox <willy@infradead.org>
Sat, 8 Dec 2018 11:15:47 +0000 (06:15 -0500)
commit3939a7fd0b94f11f376670592b2845451569675c
treeaada88dc97415430e641074c9260452a0224b454
parent081d29cd5e696f9b3059cef4161d81a92f77dfc8
maple_tree: Fix memory leak when two threads race

If another thread succeeds in allocating the node while we're sleeping
to allocate memory, we'll never use the ms->alloc, so it has to be freed
by mas_nomem().

Signed-off-by: Matthew Wilcox <willy@infradead.org>
include/linux/maple_tree.h
lib/maple_tree.c
lib/test_maple_tree.c