linux-stable/kernel/trace
Mark-PK Tsai 0816ec55fc 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 16:53:58 +02:00
..
blktrace.c blktrace: Fix uaf in blk_trace access after removing by sysfs 2021-10-06 15:05:06 +02:00
bpf_trace.c bpf: fix check of allowed specifiers in bpf_trace_printk 2018-12-17 09:28:50 +01:00
ftrace.c tracing: Have all levels of checks prevent recursion 2021-10-27 09:51:41 +02:00
Kconfig Stop the ad-hoc games with -Wno-maybe-initialized 2020-05-20 08:17:10 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
power-traces.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ring_buffer.c tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop. 2021-07-28 11:12:19 +02:00
ring_buffer_benchmark.c ring-buffer: Have ring_buffer_alloc_read_page() return error on offline CPU 2017-08-02 14:23:02 -04:00
rpm-traces.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c tracing: Avoid adding tracer option before update_tracer_options 2022-06-14 16:53:58 +02:00
trace.h tracing: Fix pid filtering when triggers are attached 2021-12-08 08:46:48 +01:00
trace_benchmark.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_benchmark.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_branch.c Revert "x86/uaccess, ftrace: Fix ftrace_likely_update() vs. SMAP" 2019-07-03 13:15:57 +02:00
trace_clock.c tracing: Do no increment trace_clock_global() by one 2021-06-30 08:48:53 -04:00
trace_entries.h tracing: Set kernel_stack's caller size properly 2020-10-01 13:12:32 +02:00
trace_event_perf.c perf/ftrace: Fix double traces of perf on ftrace:function 2017-08-29 13:29:29 +02:00
trace_events.c tracing: Check pid filtering when creating events 2021-12-08 08:46:49 +01:00
trace_events_filter.c tracing: Fix regex_match_front() to not over compare the test string 2018-05-16 10:10:27 +02:00
trace_events_filter_test.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_events_hist.c tracing: Do not reference char * as a string in histograms 2021-07-20 16:17:48 +02:00
trace_events_trigger.c tracing: Dump stacktrace trigger to the corresponding instance 2022-04-27 13:15:29 +02:00
trace_export.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_functions.c tracing: Have all levels of checks prevent recursion 2021-10-27 09:51:41 +02:00
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: Honor the tracing_cpumask 2020-08-21 09:48:19 +02: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 ftrace/kprobe: Show the maxactive number on kprobe_events 2020-04-24 08:00:50 +02:00
trace_mmiotrace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_nop.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_output.c tracing: Reorder display of TGID to be after PID 2018-07-17 11:39:30 +02:00
trace_output.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_printk.c
trace_probe.c tracing: probeevent: Fix to support minus offset from symbol 2018-03-28 18:24:42 +02:00
trace_probe.h tracing: probeevent: Fix to support minus offset from symbol 2018-03-28 18:24:42 +02:00
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 ftrace: Handle tracing when switching between context 2020-11-10 10:29:04 +01:00
trace_selftest_dynamic.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_syscalls.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_uprobe.c tracing/uprobes: Fix output for multiple string arguments 2019-02-20 10:20:53 +01:00
tracing_map.c tracing: Fix a kmemleak false positive in tracing_map 2021-12-22 09:17:58 +01:00
tracing_map.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00