summaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@oracle.com>2022-07-20 20:41:04 -0400
committerLiam R. Howlett <Liam.Howlett@oracle.com>2022-07-20 20:41:04 -0400
commit102e6194d01c1605885e330fcb67ed66d08038a5 (patch)
tree6455986ba2344c73e12f0459f00713ea1c9de27b /arch/powerpc
parent48387ec1e1de51af42e875bcec8fa96c34316e16 (diff)
maple_tree: Add a mas_destroy() call to mas_expected_entries() failure
path In an exceedingly rare case, there is a possibility that allocating all of the nodes may fail in a way that the maple state is left with some allocations completed. This would happen if the single allocation succeeds but bulk allocation fails, or if multiple bulk allocations are required and somewhere along the way one fails. The partial return is already cleaned up, but the successful allocations will remain in the maple state. When this happens, mas_expected_entries() may leak memory. Fix this by moving mas_destroy() above mas_expected_entries() and add a call to mas_destroy() to clear out all allocated memory. Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Diffstat (limited to 'arch/powerpc')
0 files changed, 0 insertions, 0 deletions