aboutsummaryrefslogtreecommitdiff
path: root/arch/arc/kernel/stacktrace.c
diff options
context:
space:
mode:
authorTakashi Iwai2020-11-24 09:12:37 +0100
committerTakashi Iwai2020-11-24 09:13:00 +0100
commit43906287380f962a7178059cf8da1e03d94da3e0 (patch)
tree669a295bf922e54c9a221550bb4598c3758ba9a0 /arch/arc/kernel/stacktrace.c
parent9ac05523d38d4c2f40c9e41fc1453146fcd74368 (diff)
parent29b105d947c661e521bf7b1005868c02441732be (diff)
Merge branch 'topic/usb-audio-refactoring' into for-next
Pull the USB audio improvement Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'arch/arc/kernel/stacktrace.c')
-rw-r--r--arch/arc/kernel/stacktrace.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arc/kernel/stacktrace.c b/arch/arc/kernel/stacktrace.c
index feba91c9d969..b23986f98450 100644
--- a/arch/arc/kernel/stacktrace.c
+++ b/arch/arc/kernel/stacktrace.c
@@ -112,7 +112,7 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,
int (*consumer_fn) (unsigned int, void *), void *arg)
{
#ifdef CONFIG_ARC_DW2_UNWIND
- int ret = 0;
+ int ret = 0, cnt = 0;
unsigned int address;
struct unwind_frame_info frame_info;
@@ -132,6 +132,11 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,
break;
frame_info.regs.r63 = frame_info.regs.r31;
+
+ if (cnt++ > 128) {
+ printk("unwinder looping too long, aborting !\n");
+ return 0;
+ }
}
return address; /* return the last address it saw */