Skip to content

Commit c9703d1

Browse files
Donglin Pengrostedt
authored andcommitted
function_graph: Fix args pointer mismatch in print_graph_retval()
When funcgraph-args and funcgraph-retaddr are both enabled, many kernel functions display invalid parameters in trace logs. The issue occurs because print_graph_retval() passes a mismatched args pointer to print_function_args(). Fix this by retrieving the correct args pointer using the FGRAPH_ENTRY_ARGS() macro. Link: https://patch.msgid.link/20260112021601.1300479-1-dolinux.peng@gmail.com Fixes: f83ac75 ("function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously") Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Donglin Peng <pengdonglin@xiaomi.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 00f13e2 commit c9703d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/trace/trace_functions_graph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ static void print_graph_retval(struct trace_seq *s, struct ftrace_graph_ent_entr
901901
trace_seq_printf(s, "%ps", func);
902902

903903
if (args_size >= FTRACE_REGS_MAX_ARGS * sizeof(long)) {
904-
print_function_args(s, entry->args, (unsigned long)func);
904+
print_function_args(s, FGRAPH_ENTRY_ARGS(entry), (unsigned long)func);
905905
trace_seq_putc(s, ';');
906906
} else
907907
trace_seq_puts(s, "();");

0 commit comments

Comments
 (0)