diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-09 10:37:10 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-09 10:37:10 +0100 |
| commit | 9b085d6e889076928d307f05cabf76e35db1e63b (patch) | |
| tree | 89c83eec98ed9bf07d07d8a7b0dea51564ecd61a /arch/arc/kernel/stacktrace.c | |
| parent | 441494ec2a302830357d0aa59f3b907e319a8b26 (diff) | |
| parent | f8394f232b1eab649ce2df5c5f15b0e528c92091 (diff) | |
Merge 5.10-rc3 into tty-next
We need the TTY/vt/serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 */ |
