diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2020-12-08 08:52:17 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2020-12-08 08:52:17 +0300 |
commit | c8bb4520543823a9b3da3861304273dc7232e2c7 (patch) | |
tree | 26670815d56dfc89fbe55e77c8e987324b70f95f /arch/arc/kernel/stacktrace.c | |
parent | f45f89a778e8a61d9c79405e8c716058b6ba12f2 (diff) | |
parent | f9b0498d29404f230894490d622e57e481c7d45a (diff) | |
download | linux-c8bb4520543823a9b3da3861304273dc7232e2c7.tar.xz |
Merge branch 'cpufreq/scmi' into cpufreq/arm/linux-next
Diffstat (limited to 'arch/arc/kernel/stacktrace.c')
-rw-r--r-- | arch/arc/kernel/stacktrace.c | 7 |
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 */ |