aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-10-03 09:08:54 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2009-10-05 04:57:56 -0400
commit75fb4090b39a3d7bf9ac77a28665c991ec5eaadc (patch)
tree127abba2cc4382cd7f70e4867184e5af0b275748 /kernel
parentfe8e5b5a60f8427940d33b205e127aecfb0bca10 (diff)
tracing: Use free_percpu instead of kfree
In the event->profile_enable() failure path, we release the per cpu buffers using kfree which is wrong because they are per cpu pointers. Although free_percpu only wraps kfree for now, that may change in the future so lets use the correct way. Reported-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_event_profile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace_event_profile.c b/kernel/trace/trace_event_profile.c
index e52784b7b844..8d5c171cc998 100644
--- a/kernel/trace/trace_event_profile.c
+++ b/kernel/trace/trace_event_profile.c
@@ -53,8 +53,8 @@ static int ftrace_profile_enable_event(struct ftrace_event_call *event)
53 53
54fail_buf_nmi: 54fail_buf_nmi:
55 if (!total_profile_count) { 55 if (!total_profile_count) {
56 kfree(trace_profile_buf_nmi); 56 free_percpu(trace_profile_buf_nmi);
57 kfree(trace_profile_buf); 57 free_percpu(trace_profile_buf);
58 trace_profile_buf_nmi = NULL; 58 trace_profile_buf_nmi = NULL;
59 trace_profile_buf = NULL; 59 trace_profile_buf = NULL;
60 } 60 }