提交 ccefbd55 编写于 作者: N Nikita Shubin 提交者: Zheng Zengkai

riscv: Fix fill_callchain return value

stable inclusion
from stable-v5.10.110
commit 24b9b8e95ca1bc87e055cf3ee4f8c502c10ef938
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24b9b8e95ca1bc87e055cf3ee4f8c502c10ef938

--------------------------------

commit 2b2b574a upstream.

perf_callchain_store return 0 on success, -1 otherwise,
fix fill_callchain to return correct bool value.

Fixes: dbeb90b0 ("riscv: Add perf callchain support")
Signed-off-by: NNikita Shubin <n.shubin@yadro.com>
Cc: stable@vger.kernel.org
Signed-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b16b2484
...@@ -77,7 +77,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry, ...@@ -77,7 +77,7 @@ void perf_callchain_user(struct perf_callchain_entry_ctx *entry,
bool fill_callchain(unsigned long pc, void *entry) bool fill_callchain(unsigned long pc, void *entry)
{ {
return perf_callchain_store(entry, pc); return perf_callchain_store(entry, pc) == 0;
} }
void notrace walk_stackframe(struct task_struct *task, void notrace walk_stackframe(struct task_struct *task,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册