mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
ARM: 5977/1: arm: Enable backtrace printing on oops when PC is corrupted
If PC points outside kernel text, start printing the backtrace at LR instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
1d40ddd10d
commit
51d47999b9
@ -359,7 +359,9 @@ void unwind_backtrace(struct pt_regs *regs, struct task_struct *tsk)
|
||||
frame.fp = regs->ARM_fp;
|
||||
frame.sp = regs->ARM_sp;
|
||||
frame.lr = regs->ARM_lr;
|
||||
frame.pc = regs->ARM_pc;
|
||||
/* PC might be corrupted, use LR in that case. */
|
||||
frame.pc = kernel_text_address(regs->ARM_pc)
|
||||
? regs->ARM_pc : regs->ARM_lr;
|
||||
} else if (tsk == current) {
|
||||
frame.fp = (unsigned long)__builtin_frame_address(0);
|
||||
frame.sp = current_sp;
|
||||
|
Loading…
Reference in New Issue
Block a user