android_kernel_xiaomi_sm8450/kernel/trace
Steven Rostedt (Google) b3183f5f05 tracing: Have option files inc the trace array ref count
commit 7e2cfbd2d3c86afcd5c26b5c4b1dd251f63c5838 upstream.

The option files update the options for a given trace array. For an
instance, if the file is opened and the instance is deleted, reading or
writing to the file will cause a use after free.

Up the ref count of the trace_array when an option file is opened.

Link: https://lkml.kernel.org/r/20230907024804.086679464@goodmis.org
Link: https://lore.kernel.org/all/1cb3aee2-19af-c472-e265-05176fe9bd84@huawei.com/

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Zheng Yejian <zhengyejian1@huawei.com>
Fixes: 8530dec63e ("tracing: Add tracing_check_open_get_tr()")
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-23 11:01:10 +02:00
..
blktrace.c blktrace: Fix output non-blktrace event when blk_classic option enabled 2023-01-14 10:15:41 +01:00
bpf_trace.c bpf: Clear the probe_addr for uprobe 2023-09-19 12:20:07 +02:00
bpf_trace.h
fgraph.c
ftrace_internal.h
ftrace.c ftrace: Fix possible warning on checking all pages used in ftrace_process_locs() 2023-07-27 08:44:44 +02:00
Kconfig
kprobe_event_gen_test.c tracing: Fix wrong return in kprobe_event_gen_test.c 2023-04-05 11:23:46 +02:00
Makefile
power-traces.c
preemptirq_delay_test.c
ring_buffer_benchmark.c
ring_buffer.c ring-buffer: Do not swap cpu_buffer during resize process 2023-08-26 15:26:46 +02:00
rpm-traces.c
synth_event_gen_test.c tracing: Fix memory leak in test_gen_synth_cmd() and test_empty_synth_event() 2022-11-25 17:45:49 +01:00
trace_benchmark.c
trace_benchmark.h
trace_boot.c tracing/boot: Fix a hist trigger dependency for boot time tracing 2021-09-22 12:28:03 +02:00
trace_branch.c
trace_clock.c
trace_dynevent.c tracing: Free buffers when a used dynamic event is removed 2022-12-08 11:23:58 +01:00
trace_dynevent.h
trace_entries.h
trace_event_perf.c
trace_events_filter_test.h
trace_events_filter.c tracing: Add ustring operation to filtering string pointers 2022-03-08 19:09:31 +01:00
trace_events_hist.c tracing/histograms: Return an error if we fail to add histogram to hist_vars list 2023-07-27 08:44:43 +02:00
trace_events_inject.c
trace_events_synth.c tracing: Add tracing_reset_all_online_cpus_unlocked() function 2023-06-28 10:28:06 +02:00
trace_events_trigger.c tracing: Dump stacktrace trigger to the corresponding instance 2022-04-27 13:53:46 +02:00
trace_events.c tracing: Fix warning in trace_buffered_event_disable() 2023-08-11 11:57:39 +02:00
trace_export.c
trace_functions_graph.c
trace_functions.c tracing: Have all levels of checks prevent recursion 2021-10-27 09:56:56 +02:00
trace_hwlat.c
trace_irqsoff.c tracing: Fix memleak due to race between current_tracer and trace 2023-08-30 16:23:12 +02:00
trace_kdb.c
trace_kprobe_selftest.c
trace_kprobe_selftest.h
trace_kprobe.c tracing/probes: Have process_fetch_insn() take a void * instead of pt_regs 2023-08-26 15:26:50 +02:00
trace_mmiotrace.c
trace_nop.c
trace_output.c tracing: Show real address for trace event arguments 2023-08-11 11:57:33 +02:00
trace_output.h
trace_preemptirq.c tracing: hold caller_addr to hardirq_{enable,disable}_ip 2022-09-23 14:16:58 +02:00
trace_printk.c
trace_probe_tmpl.h tracing/probes: Fix to update dynamic data counter if fetcharg uses it 2023-08-26 15:26:50 +02:00
trace_probe.c tracing/probes: Have kprobes and uprobes use $COMM too 2022-08-25 11:38:23 +02:00
trace_probe.h tracing/probe: trace_probe_primary_from_call(): checked list_first_entry 2023-06-09 10:30:16 +02:00
trace_sched_switch.c
trace_sched_wakeup.c tracing: Fix memleak due to race between current_tracer and trace 2023-08-30 16:23:12 +02:00
trace_selftest_dynamic.c
trace_selftest.c
trace_seq.c
trace_stack.c
trace_stat.c
trace_stat.h
trace_synth.h
trace_syscalls.c
trace_uprobe.c bpf: Clear the probe_addr for uprobe 2023-09-19 12:20:07 +02:00
trace.c tracing: Have option files inc the trace array ref count 2023-09-23 11:01:10 +02:00
trace.h tracing: Introduce pipe_cpumask to avoid race on trace_pipes 2023-09-19 12:20:06 +02:00
tracing_map.c tracing: Fix a kmemleak false positive in tracing_map 2021-12-17 10:14:40 +01:00
tracing_map.h