aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/lists.py
diff options
context:
space:
mode:
authorMathieu Desnoyers <[email protected]>2023-03-30 09:38:22 -0400
committerAndrew Morton <[email protected]>2023-04-18 14:22:12 -0700
commitb20b0368c614c609badfe16fbd113dfb4780acd9 (patch)
tree5754dd9aa60d6d5f2a8d1c7b1027dd9acae70e7a /scripts/gdb/linux/lists.py
parent1007843a91909a4995ee78a538f62d8665705b66 (diff)
mm: fix memory leak on mm_init error handling
commit f1a7941243c1 ("mm: convert mm's rss stats into percpu_counter") introduces a memory leak by missing a call to destroy_context() when a percpu_counter fails to allocate. Before introducing the per-cpu counter allocations, init_new_context() was the last call that could fail in mm_init(), and thus there was no need to ever invoke destroy_context() in the error paths. Adding the following percpu counter allocations adds error paths after init_new_context(), which means its associated destroy_context() needs to be called when percpu counters fail to allocate. Link: https://lkml.kernel.org/r/[email protected] Fixes: f1a7941243c1 ("mm: convert mm's rss stats into percpu_counter") Signed-off-by: Mathieu Desnoyers <[email protected]> Acked-by: Shakeel Butt <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/lists.py')
0 files changed, 0 insertions, 0 deletions