mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 09:50:55 +07:00
ftrace: Fix memory leak on failure path in ftrace_allocate_pages()
As struct ftrace_page is managed in a single linked list, it should free from the start page. Link: http://lkml.kernel.org/p/1402474014-28655-1-git-send-email-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
a737e6dd7b
commit
1f61be007e
@ -2637,7 +2637,8 @@ ftrace_allocate_pages(unsigned long num_to_init)
|
||||
return start_pg;
|
||||
|
||||
free_pages:
|
||||
while (start_pg) {
|
||||
pg = start_pg;
|
||||
while (pg) {
|
||||
order = get_count_order(pg->size / ENTRIES_PER_PAGE);
|
||||
free_pages((unsigned long)pg->records, order);
|
||||
start_pg = pg->next;
|
||||
|
Loading…
Reference in New Issue
Block a user