Skip to content

Commit b5d6d3f

Browse files
HSM6236rostedt
authored andcommitted
fgraph: Initialize ftrace_ops->private for function graph ops
The ftrace_pids_enabled(op) check relies on op->private being properly initialized, but fgraph_ops's underlying ftrace_ops->private was left uninitialized. This caused ftrace_pids_enabled() to always return false, effectively disabling PID filtering for function graph tracing. Fix this by copying src_ops->private to dst_ops->private in fgraph_init_ops(), ensuring PID filter state is correctly propagated. 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> Fixes: c132be2 ("function_graph: Have the instances use their own ftrace_ops for filtering") Link: https://patch.msgid.link/20251126172926004y3hC8QyU4WFOjBkU_UxLC@zte.com.cn Signed-off-by: Shengming Hu <hu.shengming@zte.com.cn> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent dcb6fa3 commit b5d6d3f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

kernel/trace/fgraph.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,7 @@ void fgraph_init_ops(struct ftrace_ops *dst_ops,
10191019
mutex_init(&dst_ops->local_hash.regex_lock);
10201020
INIT_LIST_HEAD(&dst_ops->subop_list);
10211021
dst_ops->flags |= FTRACE_OPS_FL_INITIALIZED;
1022+
dst_ops->private = src_ops->private;
10221023
}
10231024
#endif
10241025
}

0 commit comments

Comments
 (0)