]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: remove useless pc check in stacktrace handling
authorClément Léger <cleger@rivosinc.com>
Fri, 30 Aug 2024 08:49:32 +0000 (10:49 +0200)
committerAlexandre Ghiti <alexghiti@rivosinc.com>
Tue, 18 Mar 2025 09:06:21 +0000 (09:06 +0000)
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>
arch/riscv/kernel/stacktrace.c

index d4355c770c36aca4923002368a33193679c7d441..3fe9e6edef8f1ce8ea8ca34ce49254f352527faf 100644 (file)
@@ -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;