* Re: [PATCH] riscv: Fix ftrace_graph_ret_addr() to use the correct task pointer
[not found] <20260408092915.46408-1-qirui.001@bytedance.com>
@ 2026-05-14 2:15 ` Paul Walmsley
0 siblings, 0 replies; only message in thread
From: Paul Walmsley @ 2026-05-14 2:15 UTC (permalink / raw)
To: Rui Qi
Cc: pjw, palmer, aou, alex, zhangchunyan, xujiakai2025, linux-riscv,
linux-kernel
On Wed, 8 Apr 2026, Rui Qi wrote:
> The walk_stackframe() function is used to unwind the stack of a given
> task. When function graph tracing is enabled, ftrace_graph_ret_addr()
> is called to resolve the original return address if it was modified by
> the tracer.
>
> The current code incorrectly passes 'current' instead of 'task' to
> ftrace_graph_ret_addr(). This causes incorrect return address resolution
> when unwinding a stack of a different task (e.g., when the task is
> blocked in __switch_to).
>
> Fix this by passing 'task' instead of 'current' to match the behavior
> of other architectures (arm64, loongarch, powerpc, s390, x86).
>
> Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Thanks, queued for v7.1-rc.
- Paul
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-14 2:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260408092915.46408-1-qirui.001@bytedance.com>
2026-05-14 2:15 ` [PATCH] riscv: Fix ftrace_graph_ret_addr() to use the correct task pointer Paul Walmsley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox