]> git.ipfire.org Git - thirdparty/linux.git/commit
tracing: Fix enabling multiple events on the kernel command line and bootconfig
authorAndrei-Alexandru Tachici <andrei-alexandru.tachici@oss.qualcomm.com>
Mon, 2 Mar 2026 10:27:34 +0000 (11:27 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 6 Mar 2026 21:54:34 +0000 (16:54 -0500)
commit3b1679e086bb869ca02722f6bd29b3573a6a0e7e
tree558cce6603c61b4acb4c15106d7729b46c102781
parent457965c13f0837a289c9164b842d0860133f6274
tracing: Fix enabling multiple events on the kernel command line and bootconfig

Multiple events can be enabled on the kernel command line via a comma
separator. But if the are specified one at a time, then only the last
event is enabled. This is because the event names are saved in a temporary
buffer, and each call by the init cmdline code will reset that buffer.

This also affects names in the boot config file, as it may call the
callback multiple times with an example of:

  kernel.trace_event = ":mod:rproc_qcom_common", ":mod:qrtr", ":mod:qcom_aoss"

Change the cmdline callback function to append a comma and the next value
if the temporary buffer already has content.

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20260302-trace-events-allow-multiple-modules-v1-1-ce4436e37fb8@oss.qualcomm.com
Signed-off-by: Andrei-Alexandru Tachici <andrei-alexandru.tachici@oss.qualcomm.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events.c