diff options
author | 2024-08-30 10:49:32 +0200 | |
---|---|---|
committer | 2025-03-18 09:06:21 +0000 | |
commit | d3817d091fe6480de5bf3faba0fc2ce25f8d023e (patch) | |
tree | 275f02d08bae7dbb28ca677de17c0dc8e734733d | |
parent | riscv: Support huge pfnmaps (diff) | |
download | wireguard-linux-d3817d091fe6480de5bf3faba0fc2ce25f8d023e.tar.xz wireguard-linux-d3817d091fe6480de5bf3faba0fc2ce25f8d023e.zip |
riscv: remove useless pc check in stacktrace handling
Checking for pc to be a kernel text address at this location is useless
since pc == handle_exception. Remove this check.
[ alex: Fix merge conflict ]
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240830084934.3690037-1-cleger@rivosinc.com
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
-rw-r--r-- | arch/riscv/kernel/stacktrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c index d4355c770c36..3fe9e6edef8f 100644 --- a/arch/riscv/kernel/stacktrace.c +++ b/arch/riscv/kernel/stacktrace.c @@ -74,7 +74,7 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs, &frame->ra); if (pc >= (unsigned long)handle_exception && pc < (unsigned long)&ret_from_exception_end) { - if (unlikely(!__kernel_text_address(pc) || !fn(arg, pc))) + if (unlikely(!fn(arg, pc))) break; pc = ((struct pt_regs *)sp)->epc; |