Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ftrace: Avoid redundant initialization in register_ftrace_direct

The FTRACE_OPS_FL_INITIALIZED flag is cleared in register_ftrace_direct,
which can make it initialized by ftrace_ops_init() even if it is already
initialized. It seems that there is no big deal here, but let's still fix
it.

Link: https://patch.msgid.link/20251110121808.1559240-1-dongml2@chinatelecom.cn
Fixes: f64dd4627ec6 ("ftrace: Add multi direct register/unregister interface")
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Menglong Dong and committed by
Steven Rostedt (Google)
7a6735cc 49c1364c

+1 -1
+1 -1
kernel/trace/ftrace.c
··· 6069 6069 new_hash = NULL; 6070 6070 6071 6071 ops->func = call_direct_funcs; 6072 - ops->flags = MULTI_FLAGS; 6072 + ops->flags |= MULTI_FLAGS; 6073 6073 ops->trampoline = FTRACE_REGS_ADDR; 6074 6074 ops->direct_call = addr; 6075 6075