hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/8883 -------------------------------- This reverts commit 9dc1f7dc66f4a7daa276bb077712bfcd9ae11264. Wentao already backport this commit (See PR !21314), so revert it to avoid redefined error in riscv. Signed-off-by: Tengda Wu <wutengda2@huawei.com> --- arch/riscv/kernel/stacktrace.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c index 994cd6bfa468..d31ff931c39d 100644 --- a/arch/riscv/kernel/stacktrace.c +++ b/arch/riscv/kernel/stacktrace.c @@ -15,20 +15,6 @@ #include <asm/stacktrace.h> #ifdef CONFIG_FRAME_POINTER -/* - * This disables KASAN checking when reading a value from another task->stack, - * since the other task could be running on another CPU and could have poisoned - * the stack in the meantime. - */ -#define READ_ONCE_TASK_STACK(task, x) \ -({ \ - unsigned long val; \ - if (task == current) \ - val = READ_ONCE(x); \ - else \ - val = READ_ONCE_NOCHECK(x); \ - val; \ -}) /* * This disables KASAN checking when reading a value from another task's stack, @@ -99,9 +85,8 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, fp = frame->ra; pc = regs->ra; } else { - fp = READ_ONCE_TASK_STACK(task, frame->fp); - pc = READ_ONCE_TASK_STACK(task, frame->ra); - pc = ftrace_graph_ret_addr(current, &graph_idx, pc, + fp = frame->fp; + pc = ftrace_graph_ret_addr(current, &graph_idx, frame->ra, &frame->ra); if (pc >= (unsigned long)handle_exception && pc < (unsigned long)&ret_from_exception_end) { -- 2.34.1