diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-03-04 15:33:16 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-07 10:22:00 +0000 |
commit | 51d47999b9452a8dc7ae58a11423c5db28f21ae1 (patch) | |
tree | 484851de79079901b8667e9dfbaa389c51a8e73a /arch/arm/kernel | |
parent | 1d40ddd10dab332456e3863fed2a6e71aa6635ab (diff) | |
download | op-kernel-dev-51d47999b9452a8dc7ae58a11423c5db28f21ae1.zip op-kernel-dev-51d47999b9452a8dc7ae58a11423c5db28f21ae1.tar.gz |
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>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/unwind.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index 786ac2b..50292cd 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c @@ -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; |