]> git.ipfire.org Git - thirdparty/linux.git/commit
tracing/kprobes: Skip setup_boot_kprobe_events() when no cmdline event
authorYaxiong Tian <tianyaxiong@kylinos.cn>
Wed, 4 Feb 2026 01:54:01 +0000 (09:54 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 6 Feb 2026 20:27:00 +0000 (15:27 -0500)
commit2cdfe39dc9447a09c568da1b6351c70b770dd923
tree331b74670dc3c4ab96bd3ae28a4d2c1ed8c61f7f
parent0c2580a8094693578afa9b6cbcee406cf131920e
tracing/kprobes: Skip setup_boot_kprobe_events() when no cmdline event

When the 'kprobe_event=' kernel command-line parameter is not provided,
there is no need to execute setup_boot_kprobe_events().

This change optimizes the initialization function init_kprobe_trace()
by skipping unnecessary work and effectively prevents potential blocking
that could arise from contention on the event_mutex lock in subsequent
operations.

Link: https://patch.msgid.link/20260204015401.163748-1-tianyaxiong@kylinos.cn
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Yaxiong Tian <tianyaxiong@kylinos.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_kprobe.c