]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fgraph: Check ftrace_pids_enabled on registration for early filtering
authorShengming Hu <hu.shengming@zte.com.cn>
Wed, 26 Nov 2025 09:33:31 +0000 (17:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:16:57 +0000 (10:16 +0100)
commit1a793f06aa69c59024019dadf09dd736954f2a9b
tree6b3df487d4d8bb54204660668e122b5627387e3e
parentc0a565f133f385f15e69db46e4a9f8d35fe2afca
fgraph: Check ftrace_pids_enabled on registration for early filtering

commit 1650a1b6cb1ae6cb99bb4fce21b30ebdf9fc238e upstream.

When registering ftrace_graph, check if ftrace_pids_enabled is active.
If enabled, assign entryfunc to fgraph_pid_func to ensure filtering
is performed before executing the saved original entry function.

Cc: stable@vger.kernel.org
Cc: <wang.yaxin@zte.com.cn>
Cc: <mhiramat@kernel.org>
Cc: <mark.rutland@arm.com>
Cc: <mathieu.desnoyers@efficios.com>
Cc: <zhang.run@zte.com.cn>
Cc: <yang.yang29@zte.com.cn>
Link: https://patch.msgid.link/20251126173331679XGVF98NLhyLJRdtNkVZ6w@zte.com.cn
Fixes: df3ec5da6a1e7 ("function_graph: Add pid tracing back to function graph tracer")
Signed-off-by: Shengming Hu <hu.shengming@zte.com.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/fgraph.c