projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a737e6d
)
ftrace: Fix memory leak on failure path in ftrace_allocate_pages()
author
Namhyung Kim
<namhyung@kernel.org>
Wed, 11 Jun 2014 08:06:53 +0000
(17:06 +0900)
committer
Steven Rostedt
<rostedt@goodmis.org>
Tue, 1 Jul 2014 11:13:40 +0000
(07:13 -0400)
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>
kernel/trace/ftrace.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/trace/ftrace.c
b/kernel/trace/ftrace.c
index 39df3192e725b3c0b271735370ed6fa2997409d0..e14ff4c1713eea50c9f73cb0380286435f9511f0 100644
(file)
--- a/
kernel/trace/ftrace.c
+++ b/
kernel/trace/ftrace.c
@@
-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;