Skip to content

Commit 7a6735c

Browse files
image-dragonrostedt
authored andcommitted
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: f64dd46 ("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>
1 parent 49c1364 commit 7a6735c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/trace/ftrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6069,7 +6069,7 @@ int register_ftrace_direct(struct ftrace_ops *ops, unsigned long addr)
60696069
new_hash = NULL;
60706070

60716071
ops->func = call_direct_funcs;
6072-
ops->flags = MULTI_FLAGS;
6072+
ops->flags |= MULTI_FLAGS;
60736073
ops->trampoline = FTRACE_REGS_ADDR;
60746074
ops->direct_call = addr;
60756075

0 commit comments

Comments
 (0)