mint0x33/kernel/trace
Steven Rostedt (VMware) 581695e615 tracing: Disable trace_printk() on post poned tests
commit 78041c0c9e935d9ce4086feeff6c569ed88ddfd4 upstream.

The tracing seftests checks various aspects of the tracing infrastructure,
and one is filtering. If trace_printk() is active during a self test, it can
cause the filtering to fail, which will disable that part of the trace.

To keep the selftests from failing because of trace_printk() calls,
trace_printk() checks the variable tracing_selftest_running, and if set, it
does not write to the tracing buffer.

As some tracers were registered earlier in boot, the selftest they triggered
would fail because not all the infrastructure was set up for the full
selftest. Thus, some of the tests were post poned to when their
infrastructure was ready (namely file system code). The postpone code did
not set the tracing_seftest_running variable, and could fail if a
trace_printk() was added and executed during their run.

Cc: stable@vger.kernel.org
Fixes: 9afecfbb95 ("tracing: Postpone tracer start-up tests till the system is more robust")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-11 18:02:50 +01:00
..
blktrace.c
bpf_trace.c
ftrace.c ftrace: fpid_next() should increase position index 2020-02-28 16:36:07 +01:00
Kconfig
Makefile
power-traces.c
ring_buffer.c trace: Fix preempt_enable_no_resched() abuse 2019-05-02 09:40:28 +02:00
ring_buffer_benchmark.c
rpm-traces.c
trace.c tracing: Disable trace_printk() on post poned tests 2020-03-11 18:02:50 +01:00
trace.h ftrace: Protect ftrace_graph_hash with ftrace_sync 2020-02-14 16:32:13 -05:00
trace_benchmark.c
trace_benchmark.h
trace_branch.c Revert "x86/uaccess, ftrace: Fix ftrace_likely_update() vs. SMAP" 2019-07-03 13:15:57 +02:00
trace_clock.c
trace_entries.h
trace_event_perf.c
trace_events.c tracing: Fix lock inversion in trace_event_enable_tgid_record() 2020-01-09 10:17:56 +01:00
trace_events_filter.c
trace_events_filter_test.h
trace_events_hist.c
trace_events_trigger.c trigger_next should increase position index 2020-02-28 16:36:07 +01:00
trace_export.c
trace_functions.c
trace_functions_graph.c tracing/fgraph: Fix set_graph_function from showing interrupts 2019-05-16 19:42:27 +02:00
trace_hwlat.c tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency 2019-10-17 13:43:58 -07:00
trace_irqsoff.c tracing/fgraph: Fix set_graph_function from showing interrupts 2019-05-16 19:42:27 +02:00
trace_kdb.c tracing: Silence GCC 9 array bounds warning 2019-06-25 11:36:50 +08:00
trace_kprobe.c
trace_mmiotrace.c
trace_nop.c
trace_output.c
trace_output.h
trace_printk.c
trace_probe.c
trace_probe.h
trace_sched_switch.c tracing: Fix sched switch start/stop refcount racy updates 2020-02-14 16:32:07 -05:00
trace_sched_wakeup.c kernel/trace: Fix do not unregister tracepoints when register sched_migrate_task fail 2020-01-14 20:05:40 +01:00
trace_selftest.c
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined 2020-01-14 20:05:40 +01:00
trace_stat.c tracing: Fix very unlikely race of registering two stat tracers 2020-02-28 16:35:58 +01:00
trace_stat.h
trace_syscalls.c
trace_uprobe.c
tracing_map.c tracing: Have the histogram compare functions convert to u64 first 2020-01-09 10:17:56 +01:00
tracing_map.h