From: Masami Hiramatsu (Google) Date: Sun, 18 Aug 2024 12:50:28 +0000 (+0900) Subject: tracing: Fix function timing profiler to initialize hashtable X-Git-Tag: v6.13-rc1~163^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c54a1a06daa78613519b4d24495b0d175b8af63f;p=thirdparty%2Fkernel%2Flinux.git tracing: Fix function timing profiler to initialize hashtable Since the new fgraph requires to initialize fgraph_ops.ops.func_hash before calling register_ftrace_graph(), initialize it with default (tracing all functions) parameter. Cc: stable@vger.kernel.org Fixes: 5fccc7552ccb ("ftrace: Add subops logic to allow one ops to manage many") Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 4c28dd177ca65..d2dd71d04b8ac 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -883,6 +883,10 @@ static void profile_graph_return(struct ftrace_graph_ret *trace, } static struct fgraph_ops fprofiler_ops = { + .ops = { + .flags = FTRACE_OPS_FL_INITIALIZED, + INIT_OPS_HASH(fprofiler_ops.ops) + }, .entryfunc = &profile_graph_entry, .retfunc = &profile_graph_return, };