diff options
author | Qing Zhang <zhangqing@loongson.cn> | 2022-12-10 15:40:21 +0100 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2022-12-14 01:41:54 +0100 |
commit | a51ac5246d2505b58229242959d2bc73d113ca50 (patch) | |
tree | a51e352384af8317ace4baf429c9457ad25d9435 /arch/loongarch/kernel/ftrace_dyn.c | |
parent | LoongArch/ftrace: Add HAVE_DYNAMIC_FTRACE_WITH_ARGS support (diff) | |
download | linux-a51ac5246d2505b58229242959d2bc73d113ca50.tar.xz linux-a51ac5246d2505b58229242959d2bc73d113ca50.zip |
LoongArch/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support
ftrace_graph_ret_addr() can be called by stack unwinding code to convert
a found stack return address ('ret') to its original value, in case the
function graph tracer has modified it to be 'return_to_handler'. If the
hasn't been modified, the unchanged value of 'ret' is returned.
Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/ftrace_dyn.c')
-rw-r--r-- | arch/loongarch/kernel/ftrace_dyn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/kernel/ftrace_dyn.c b/arch/loongarch/kernel/ftrace_dyn.c index 439ba829b9fd..e23c3be29baa 100644 --- a/arch/loongarch/kernel/ftrace_dyn.c +++ b/arch/loongarch/kernel/ftrace_dyn.c @@ -135,7 +135,7 @@ void prepare_ftrace_return(unsigned long self_addr, unsigned long *parent) old = *parent; - if (!function_graph_enter(old, self_addr, 0, NULL)) + if (!function_graph_enter(old, self_addr, 0, parent)) *parent = return_hooker; } |