summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2024-06-27 09:29:59 +0200
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-07-02 10:17:00 +0200
commit4e7b4ff2dcaed228cb2fb7bfe720262c98ec1bb9 (patch)
tree40e54b633f7734eec7cfa5aa2e0fb4171bad639a
parentARM: 9405/1: ftrace: Don't assume stack frames are contiguous in memory (diff)
downloadlinux-4e7b4ff2dcaed228cb2fb7bfe720262c98ec1bb9.tar.xz
linux-4e7b4ff2dcaed228cb2fb7bfe720262c98ec1bb9.zip
ARM: 9406/1: Fix callchain_trace() return value
perf_callchain_store() return 0 on success, -1 otherwise, fix callchain_trace() to return correct bool value. So walk_stackframe() can have a chance to stop walking the stack ahead. Fixes: 70ccc7c0667b ("ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r--arch/arm/kernel/perf_callchain.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/kernel/perf_callchain.c b/arch/arm/kernel/perf_callchain.c
index 7147edbe56c6..1d230ac9d0eb 100644
--- a/arch/arm/kernel/perf_callchain.c
+++ b/arch/arm/kernel/perf_callchain.c
@@ -85,8 +85,7 @@ static bool
callchain_trace(void *data, unsigned long pc)
{
struct perf_callchain_entry_ctx *entry = data;
- perf_callchain_store(entry, pc);
- return true;
+ return perf_callchain_store(entry, pc) == 0;
}
void