linux-stable/kernel/trace
Mark-PK Tsai a8b5c425ad 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:41:27 +02:00
..
Kconfig ftrace: Have architectures opt-in for mcount build time sorting 2022-01-27 19:15:44 -05:00
Makefile tracing: Place trace_pid_list logic into abstract functions 2021-10-05 17:30:08 -04:00
blktrace.c blktrace: fix use after free for struct blk_trace 2022-02-28 06:36:33 -07:00
bpf_trace.c bpf: Add MEM_RDONLY for helper args that are pointers to rdonly mem. 2021-12-18 13:27:41 -08:00
bpf_trace.h
error_report-traces.c
fgraph.c x86/ftrace: Make function graph use ftrace directly 2021-10-20 23:44:43 -04:00
ftrace.c ftrace: Clean up hash direct_functions on register failures 2022-06-09 10:26:27 +02:00
ftrace_internal.h
kprobe_event_gen_test.c
pid_list.c tracing: Initialize upper and lower vars in pid_list_refill_irq() 2021-10-07 09:56:38 -04:00
pid_list.h tracing: Create a sparse bitmask for pid filtering 2021-10-05 17:38:45 -04:00
power-traces.c
preemptirq_delay_test.c
ring_buffer.c ring-buffer: make use of the helper function kthread_run_on_cpu() 2022-01-15 16:30:23 +02:00
ring_buffer_benchmark.c
rpm-traces.c
synth_event_gen_test.c tracing: Fix various typos in comments 2021-03-23 14:08:18 -04:00
trace.c tracing: Avoid adding tracer option before update_tracer_options 2022-06-14 18:41:27 +02:00
trace.h eprobes: Remove redundant event type information 2022-02-25 12:07:01 -05:00
trace_benchmark.c
trace_benchmark.h
trace_boot.c tracing: Initialize integer variable to prevent garbage return value 2022-06-09 10:26:20 +02:00
trace_branch.c
trace_clock.c tracing: Do no increment trace_clock_global() by one 2021-06-18 09:10:00 -04:00
trace_dynevent.c tracing: Disable "other" permission bits in the tracefs files 2021-10-08 18:08:43 -04:00
trace_dynevent.h tracing: Add DYNAMIC flag for dynamic events 2021-08-18 18:10:32 -04:00
trace_entries.h trace: Add timerlat tracer 2021-06-25 19:57:24 -04:00
trace_eprobe.c eprobes: Remove redundant event type information 2022-02-25 12:07:01 -05:00
trace_event_perf.c tracing: Show size of requested perf buffer 2021-10-27 12:25:09 -04:00
trace_events.c tracing: Have type enum modifications copy the strings 2022-04-08 13:58:59 +02:00
trace_events_filter.c tracing: Add ustring operation to filtering string pointers 2022-01-14 03:42:24 -05:00
trace_events_filter_test.h
trace_events_hist.c tracing: Fix potential double free in create_var_ref() 2022-06-09 10:26:20 +02:00
trace_events_inject.c tracing: Support __rel_loc relative dynamic data location attribute 2021-12-06 15:37:21 -05:00
trace_events_synth.c Tracing updates for 5.17: 2022-01-16 10:15:32 +02:00
trace_events_trigger.c tracing: Uninline trace_trigger_soft_disabled() partly 2022-02-25 12:07:01 -05:00
trace_export.c
trace_functions.c ftrace: disable preemption when recursion locked 2021-10-27 11:21:49 -04:00
trace_functions_graph.c tracing: in_irq() cleanup 2021-10-13 18:19:41 -04:00
trace_hwlat.c trace/hwlat: make use of the helper function kthread_run_on_cpu() 2022-01-15 16:30:24 +02:00
trace_irqsoff.c
trace_kdb.c kdb: Rename members of struct kdbtab_t 2021-07-27 17:05:06 +01:00
trace_kprobe.c tracing: Fix return value of __setup handlers 2022-03-04 13:46:13 -05: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:26:15 +02:00
trace_output.c tracing: Account bottom half disabled sections. 2022-01-13 16:23:04 -05:00
trace_output.h
trace_preemptirq.c
trace_printk.c tracing: Disable "other" permission bits in the tracefs files 2021-10-08 18:08:43 -04:00
trace_probe.c eprobes: Remove redundant event type information 2022-02-25 12:07:01 -05:00
trace_probe.h eprobes: Remove redundant event type information 2022-02-25 12:07:01 -05:00
trace_probe_tmpl.h tracing/probes: Have process_fetch_insn() take a void * instead of pt_regs 2021-08-19 09:09:03 -04:00
trace_recursion_record.c tracing: Disable "other" permission bits in the tracefs files 2021-10-08 18:08:43 -04:00
trace_sched_switch.c
trace_sched_wakeup.c tracing: Change variable type as bool for clean-up 2021-06-30 09:19:14 -04:00
trace_selftest.c tracing: Reset the function filter after completing trampoline/graph selftest 2022-06-09 10:26:14 +02:00
trace_selftest_dynamic.c
trace_seq.c tracing: Fix various typos in comments 2021-03-23 14:08:18 -04:00
trace_stack.c tracing: Disable "other" permission bits in the tracefs files 2021-10-08 18:08:43 -04:00
trace_stat.c tracing: Disable "other" permission bits in the tracefs files 2021-10-08 18:08:43 -04:00
trace_stat.h
trace_synth.h tracing: synth events: increase max fields count 2021-09-08 15:29:16 -04:00
trace_syscalls.c tracing: Make tp_printk work on syscall tracepoints 2022-06-14 18:41:27 +02:00
trace_uprobe.c Tracing updates for 5.17: 2022-01-16 10:15:32 +02:00
tracing_map.c tracing: Fix a kmemleak false positive in tracing_map 2021-12-01 21:04:34 -05:00
tracing_map.h