summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_selftest.c
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2023-05-28 08:17:41 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-05-29 04:15:33 +0300
commitac9d2cb1d5f8e22235c399338504dadc87d14e74 (patch)
tree25b1edb4a119d12f23a9057e029400d488b8bd68 /kernel/trace/trace_selftest.c
parenta3ae76d7ff781208100e6acc58eb09afb7b4b177 (diff)
downloadlinux-ac9d2cb1d5f8e22235c399338504dadc87d14e74.tar.xz
tracing: Only make selftest conditionals affect the global_trace
The tracing_selftest_running and tracing_selftest_disabled variables were to keep trace_printk() and other writes from affecting the tracing selftests, as the tracing selftests would examine the ring buffer to see if it contained what it expected or not. trace_printk() and friends could add to the ring buffer and cause the selftests to fail (and then disable the tracer that was being tested). To keep that from happening, these variables were added and would keep trace_printk() and friends from writing to the ring buffer while the tests were going on. But this was only the top level ring buffer (owned by the global_trace instance). There is no reason to prevent writing into ring buffers of other instances via the trace_array_printk() and friends. For the functions that could be used by other instances, check if the global_trace is the tracer instance that is being written to before deciding to not allow the write. Link: https://lkml.kernel.org/r/20230528051742.1325503-5-rostedt@goodmis.org Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_selftest.c')
0 files changed, 0 insertions, 0 deletions