linux-stable/kernel/trace
Mark-PK Tsai ac40847b97 tracing: Avoid adding tracer option before update_tracer_options
[ Upstream commit ef9188bcc6 ]

To prepare for support asynchronous tracer_init_tracefs initcall,
avoid calling create_trace_option_files before __update_tracer_options.
Otherwise, create_trace_option_files will show warning because
some tracers in trace_types list are already in tr->topts.

For example, hwlat_tracer call register_tracer in late_initcall,
and global_trace.dir is already created in tracing_init_dentry,
hwlat_tracer will be put into tr->topts.
Then if the __update_tracer_options is executed after hwlat_tracer
registered, create_trace_option_files find that hwlat_tracer is
already in tr->topts.

Link: https://lkml.kernel.org/r/20220426122407.17042-2-mark-pk.tsai@mediatek.com

Link: https://lore.kernel.org/lkml/20220322133339.GA32582@xsang-OptiPlex-9020/
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:45:01 +02:00
..
blktrace.c SCSI misc on 20220324 2022-03-24 19:37:53 -07:00
bpf_trace.c bpf: Move rcu lock management out of BPF_PROG_RUN routines 2022-06-09 10:29:59 +02:00
bpf_trace.h
error_report-traces.c
fgraph.c sched/tracing: Append prev_state to tp args instead 2022-05-12 00:37:11 +02:00
fprobe.c fprobe: Fix sparse warning for acccessing __rcu ftrace_hash 2022-03-28 19:05:40 -07:00
ftrace.c ftrace: Clean up hash direct_functions on register failures 2022-06-09 10:30:51 +02:00
ftrace_internal.h
Kconfig tracing: mark user_events as BROKEN 2022-04-02 10:32:14 -07:00
kprobe_event_gen_test.c
Makefile Networking changes for 5.18. 2022-03-24 13:13:26 -07:00
pid_list.c
pid_list.h
power-traces.c
preemptirq_delay_test.c
rethook.c rethook: Fix to use WRITE_ONCE() for rethook:: Handler 2022-03-30 19:28:17 -07:00
ring_buffer.c
ring_buffer_benchmark.c
rpm-traces.c
synth_event_gen_test.c
trace.c tracing: Avoid adding tracer option before update_tracer_options 2022-06-14 18:45:01 +02:00
trace.h Tracing updates for 5.18: 2022-03-23 11:40:25 -07:00
trace_benchmark.c
trace_benchmark.h
trace_boot.c tracing: Initialize integer variable to prevent garbage return value 2022-06-09 10:30:44 +02:00
trace_branch.c
trace_clock.c
trace_dynevent.c
trace_dynevent.h
trace_entries.h
trace_eprobe.c
trace_event_perf.c
trace_events.c tracing: Have event format check not flag %p* on __get_dynamic_array() 2022-06-09 10:30:43 +02:00
trace_events_filter.c
trace_events_filter_test.h
trace_events_hist.c tracing: Fix potential double free in create_var_ref() 2022-06-09 10:30:43 +02:00
trace_events_inject.c
trace_events_synth.c tracing: Fix strncpy warning in trace_events_synth.c 2022-03-11 11:49:24 -05:00
trace_events_trigger.c
trace_events_user.c tracing: mark user_events as BROKEN 2022-04-02 10:32:14 -07:00
trace_export.c
trace_functions.c
trace_functions_graph.c
trace_hwlat.c
trace_irqsoff.c
trace_kdb.c
trace_kprobe.c kprobes: Use rethook for kretprobe if possible 2022-03-28 19:38:09 -07:00
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_mmiotrace.c
trace_nop.c
trace_osnoise.c tracing/timerlat: Notify IRQ new max latency only if stop tracing is set 2022-06-09 10:30:38 +02:00
trace_output.c
trace_output.h
trace_preemptirq.c
trace_printk.c
trace_probe.c
trace_probe.h
trace_probe_tmpl.h
trace_recursion_record.c
trace_sched_switch.c sched/tracing: Append prev_state to tp args instead 2022-05-12 00:37:11 +02:00
trace_sched_wakeup.c sched/tracing: Append prev_state to tp args instead 2022-05-12 00:37:11 +02:00
trace_selftest.c tracing: Reset the function filter after completing trampoline/graph selftest 2022-06-09 10:30:37 +02:00
trace_selftest_dynamic.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_synth.h
trace_syscalls.c tracing: Make tp_printk work on syscall tracepoints 2022-06-14 18:45:01 +02:00
trace_uprobe.c
tracing_map.c
tracing_map.h