aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-06-06 23:17:28 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-06-06 23:17:28 -0400
commita9fcaaac37b3baba1343f906f52aeb65c4d4e356 (patch)
treeb0fb182c483b2737f410a50588a7158288b4dd27 /kernel/trace
parent23aaa3c18e33fe048671b419781b5e44175efafe (diff)
tracing: Fix memory leak on instance deletion
When an instance is created, it also gets a snapshot ring buffer allocated (with minimum of pages). But when it is deleted the snapshot buffer is not. There was a helper function added to match the allocation of these ring buffers to a way to free them, but it wasn't used by the deletion of an instance. Using that helper function solves this memory leak. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 26cfff38e2ab..16f7038d1f4d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6349,8 +6349,7 @@ static int instance_delete(const char *name)
6349 event_trace_del_tracer(tr); 6349 event_trace_del_tracer(tr);
6350 ftrace_destroy_function_files(tr); 6350 ftrace_destroy_function_files(tr);
6351 debugfs_remove_recursive(tr->dir); 6351 debugfs_remove_recursive(tr->dir);
6352 free_percpu(tr->trace_buffer.data); 6352 free_trace_buffers(tr);
6353 ring_buffer_free(tr->trace_buffer.buffer);
6354 6353
6355 kfree(tr->name); 6354 kfree(tr->name);
6356 kfree(tr); 6355 kfree(tr);