]> git.ipfire.org Git - thirdparty/linux.git/commit
ftrace: Have ftrace_free_filter() WARN and exit if ops is active
authorSteven Rostedt <rostedt@goodmis.org>
Wed, 19 Feb 2025 18:50:40 +0000 (13:50 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 4 Mar 2025 16:26:48 +0000 (11:26 -0500)
commit0c667775fe25eeff988fb5124f390dcf923e93cf
tree3e365391042c5335dbda1de518078adfc6193b34
parent97d6a9c4b39aa8ef17fabe6396ff5e9d835f91ba
ftrace: Have ftrace_free_filter() WARN and exit if ops is active

The ftrace_free_filter() is used to reset the ops filters. But it must be
done if the ops is not currently active (tracing). If it is, it will mess
up the ftrace accounting of what functions are attached and what is not.

WARN and exit the ftrace_free_filter() if the ops is active when it is
called.

Currently, it doesn't seem if anything does this, but it may in the
future.

Link: https://lore.kernel.org/all/20250219095330.2e9f171c@gandalf.local.home/
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250219135040.3a9fbe00@gandalf.local.home
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/ftrace.c