]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Check total refcount before releasing bufs in profile_enable failure
authorFrederic Weisbecker <fweisbec@gmail.com>
Sat, 3 Oct 2009 12:55:18 +0000 (14:55 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 5 Oct 2009 08:57:41 +0000 (10:57 +0200)
commit131385245dc2426ab58cfedd1e0489ad2d3dfc45
treed4d18d4a69175f715c9483e0e92ae73f8deda090
parent568f344c0ea6ebd3c4b04caeb6653b34fef93706
tracing: Check total refcount before releasing bufs in profile_enable failure

When we call the profile_enable() callback of an event, we release the
shared perf event tracing buffers unconditionnaly in the failure path.
This is wrong because there may be other users of these. Then check the
total refcount before doing this.

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>
kernel/trace/trace_event_profile.c