diff options
author | Oleg Nesterov <[email protected]> | 2013-07-29 19:50:33 +0200 |
---|---|---|
committer | Steven Rostedt <[email protected]> | 2013-07-31 13:12:48 -0400 |
commit | 2816c551c796ec14620325b2c9ed75b9979d3125 (patch) | |
tree | c4bc262514de5ef265001411bcdf7ad65916eae9 /net/unix/sysctl_net_unix.c | |
parent | 776164c1faac4966ab14418bb0922e1820da1d19 (diff) |
tracing: trace_remove_event_call() should fail if call/file is in use
Change trace_remove_event_call(call) to return the error if this
call is active. This is what the callers assume but can't verify
outside of the tracing locks. Both trace_kprobe.c/trace_uprobe.c
need the additional changes, unregister_trace_probe() should abort
if trace_remove_event_call() fails.
The caller is going to free this call/file so we must ensure that
nobody can use them after trace_remove_event_call() succeeds.
debugfs should be fine after the previous changes and event_remove()
does TRACE_REG_UNREGISTER, but still there are 2 reasons why we need
the additional checks:
- There could be a perf_event(s) attached to this tp_event, so the
patch checks ->perf_refcount.
- TRACE_REG_UNREGISTER can be suppressed by FTRACE_EVENT_FL_SOFT_MODE,
so we simply check FTRACE_EVENT_FL_ENABLED protected by event_mutex.
Link: http://lkml.kernel.org/r/[email protected]
Reviewed-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions