linux-stable/kernel/trace
Masami Hiramatsu 0e2b81f7b5 tracing: Remove unneeded synth_event_mutex
Rmove unneeded synth_event_mutex. This mutex protects the reference
count in synth_event, however, those operational points are already
protected by event_mutex.

1. In __create_synth_event() and create_or_delete_synth_event(),
 those synth_event_mutex clearly obtained right after event_mutex.

2. event_hist_trigger_func() is trigger_hist_cmd.func() which is
 called by trigger_process_regex(), which is a part of
 event_trigger_regex_write() and this function takes event_mutex.

3. hist_unreg_all() is trigger_hist_cmd.unreg_all() which is called
 by event_trigger_regex_open() and it takes event_mutex.

4. onmatch_destroy() and onmatch_create() have long call tree,
 but both are finally invoked from event_trigger_regex_write()
 and event_trace_del_tracer(), former takes event_mutex, and latter
 ensures called under event_mutex locked.

Finally, I ensured there is no resource conflict. For safety,
I added lockdep_assert_held(&event_mutex) for each function.

Link: http://lkml.kernel.org/r/154140864134.17322.4796059721306031894.stgit@devbox

Reviewed-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Tested-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-12-08 20:54:10 -05:00
..
blktrace.c blkcg: revert blkcg cleanups series 2018-11-01 19:59:53 -06:00
bpf_trace.c
fgraph.c function_graph: Have profiler use new helper ftrace_graph_get_ret_stack() 2018-12-08 20:54:07 -05:00
ftrace.c function_graph: Have profiler use new helper ftrace_graph_get_ret_stack() 2018-12-08 20:54:07 -05:00
ftrace_internal.h ftrace: Create new ftrace_internal.h header 2018-12-08 20:54:06 -05:00
Kconfig tracing: Use dyn_event framework for synthetic events 2018-12-08 20:54:10 -05:00
Makefile tracing: Add unified dynamic event framework 2018-12-08 20:54:09 -05:00
power-traces.c
preemptirq_delay_test.c tracing: Use trace_clock_local() for looping in preemptirq_delay_test.c 2018-10-17 15:35:33 -04:00
ring_buffer.c tracing: Add tracefs file buffer_percentage 2018-12-08 20:54:08 -05:00
ring_buffer_benchmark.c
rpm-traces.c
trace.c tracing: Use dyn_event framework for synthetic events 2018-12-08 20:54:10 -05:00
trace.h tracing: Add tracefs file buffer_percentage 2018-12-08 20:54:08 -05:00
trace_benchmark.c
trace_benchmark.h
trace_branch.c
trace_clock.c
trace_dynevent.c tracing: Add unified dynamic event framework 2018-12-08 20:54:09 -05:00
trace_dynevent.h tracing: Add unified dynamic event framework 2018-12-08 20:54:09 -05:00
trace_entries.h
trace_event_perf.c trace_uprobe: support reference counter in fd-based uprobe 2018-10-10 22:14:17 -04:00
trace_events.c tracing: Lock event_mutex before synth_event_mutex 2018-12-08 20:54:09 -05:00
trace_events_filter.c
trace_events_filter_test.h
trace_events_hist.c tracing: Remove unneeded synth_event_mutex 2018-12-08 20:54:10 -05:00
trace_events_trigger.c
trace_export.c
trace_functions.c
trace_functions_graph.c function_graph: Move ftrace_graph_ret_addr() to fgraph.c 2018-12-08 20:54:07 -05:00
trace_hwlat.c
trace_irqsoff.c fgraph: Add new fgraph_ops structure to enable function graph hooks 2018-12-08 20:54:07 -05:00
trace_kdb.c
trace_kprobe.c tracing/kprobes: Use dyn_event framework for kprobe events 2018-12-08 20:54:09 -05:00
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_mmiotrace.c
trace_nop.c
trace_output.c
trace_output.h
trace_preemptirq.c
trace_printk.c tracing: Trivia spelling fix containerof() -> container_of() 2018-09-26 12:21:00 +03:00
trace_probe.c tracing/kprobes: Use dyn_event framework for kprobe events 2018-12-08 20:54:09 -05:00
trace_probe.h tracing/kprobes: Use dyn_event framework for kprobe events 2018-12-08 20:54:09 -05:00
trace_probe_tmpl.h tracing: probeevent: Add array type support 2018-10-10 22:19:10 -04:00
trace_sched_switch.c
trace_sched_wakeup.c fgraph: Add new fgraph_ops structure to enable function graph hooks 2018-12-08 20:54:07 -05:00
trace_selftest.c fgraph: Add new fgraph_ops structure to enable function graph hooks 2018-12-08 20:54:07 -05:00
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c tracing: Have trace_stack nr_entries compare not be so subtle 2018-12-08 20:54:07 -05:00
trace_stat.c
trace_stat.h
trace_syscalls.c
trace_uprobe.c tracing/uprobes: Use dyn_event framework for uprobe events 2018-12-08 20:54:10 -05:00
tracing_map.c
tracing_map.h