summaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/stacktrace.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-13 06:17:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-13 06:17:49 +0100
commitbe887fcad3f18031232eabcb398d009a3fc3ef61 (patch)
tree2b9419417e66e3b073cc157682f10c63285f16d1 /arch/riscv/kernel/stacktrace.c
parent44cefdf1cc6d1b912eca6004012e587174e32eeb (diff)
parent5bc55a333a2f7316b58edc7573e8e893f7acb532 (diff)
downloadlinux-be887fcad3f18031232eabcb398d009a3fc3ef61.tar.gz
linux-be887fcad3f18031232eabcb398d009a3fc3ef61.tar.bz2
linux-be887fcad3f18031232eabcb398d009a3fc3ef61.zip
Merge 6.13-rc4 into char-misc-next
We need the IIO fixes in here as well, and it resolves a merge conflict in: drivers/iio/adc/ti-ads1119.c Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/riscv/kernel/stacktrace.c')
-rw-r--r--arch/riscv/kernel/stacktrace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c
index 153a2db4c5fa..d4355c770c36 100644
--- a/arch/riscv/kernel/stacktrace.c
+++ b/arch/riscv/kernel/stacktrace.c
@@ -17,6 +17,7 @@
#ifdef CONFIG_FRAME_POINTER
extern asmlinkage void handle_exception(void);
+extern unsigned long ret_from_exception_end;
static inline int fp_is_valid(unsigned long fp, unsigned long sp)
{
@@ -71,7 +72,8 @@ void notrace walk_stackframe(struct task_struct *task, struct pt_regs *regs,
fp = frame->fp;
pc = ftrace_graph_ret_addr(current, &graph_idx, frame->ra,
&frame->ra);
- if (pc == (unsigned long)handle_exception) {
+ if (pc >= (unsigned long)handle_exception &&
+ pc < (unsigned long)&ret_from_exception_end) {
if (unlikely(!__kernel_text_address(pc) || !fn(arg, pc)))
break;