android_kernel_samsung_a7y1.../kernel/trace
Steven Rostedt (VMware) 4058ed3a33 tracing: Fix very unlikely race of registering two stat tracers
[ Upstream commit dfb6cd1e654315168e36d947471bd2a0ccd834ae ]

Looking through old emails in my INBOX, I came across a patch from Luis
Henriques that attempted to fix a race of two stat tracers registering the
same stat trace (extremely unlikely, as this is done in the kernel, and
probably doesn't even exist). The submitted patch wasn't quite right as it
needed to deal with clean up a bit better (if two stat tracers were the
same, it would have the same files).

But to make the code cleaner, all we needed to do is to keep the
all_stat_sessions_mutex held for most of the registering function.

Link: http://lkml.kernel.org/r/1410299375-20068-1-git-send-email-luis.henriques@canonical.com

Fixes: 002bb86d8d42f ("tracing/ftrace: separate events tracing and stats tracing engine")
Reported-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 13:55:56 +02:00
..
blktrace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bpf_trace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ftrace.c ftrace: Avoid potential division by zero in function profiler 2020-04-07 13:24:49 +02:00
gpu-traces.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
power-traces.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ring_buffer_benchmark.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ring_buffer.c trace: Fix preempt_enable_no_resched() abuse 2020-04-06 16:38:41 +02:00
rpm-traces.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_benchmark.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_benchmark.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_branch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_clock.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_entries.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_event_perf.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_events_filter_test.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_events_filter.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_events_trigger.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_events.c tracing: Fix partial reading of trace event's id file 2020-04-06 18:14:00 +02:00
trace_export.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_functions_graph.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_functions.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_irqsoff.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_kdb.c tracing: Silence GCC 9 array bounds warning 2020-04-06 19:14:20 +02:00
trace_kprobe.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_mmiotrace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_nop.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_output.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_output.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_printk.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_probe.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_probe.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_sched_switch.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_sched_wakeup.c kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail 2020-04-07 13:29:35 +02:00
trace_selftest_dynamic.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_selftest.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_seq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_stack.c tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined 2020-04-07 13:29:37 +02:00
trace_stat.c tracing: Fix very unlikely race of registering two stat tracers 2020-04-07 13:55:56 +02:00
trace_stat.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_syscalls.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace_uprobe.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace.c tracing: Initialize iter->seq after zeroing in tracing_read_pipe() 2020-04-07 09:27:54 +02:00
trace.h tracing: Silence GCC 9 array bounds warning 2020-04-06 19:14:20 +02:00