summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-06-05 14:29:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-05 14:29:53 -0700
commit5965087dc96167298ab83598f681d4d6f9d324fa (patch)
tree97feb8d8a546261de23024d5b4ee5797b03f988a /arch/mips/kernel/traps.c
parent698f7a4a12c15fef354b2a1ac14f90a0e71008d9 (diff)
parentcd9da13d6ef4f4b652a9a885d4a7c80e40fed229 (diff)
downloadop-kernel-dev-5965087dc96167298ab83598f681d4d6f9d324fa.zip
op-kernel-dev-5965087dc96167298ab83598f681d4d6f9d324fa.tar.gz
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: Fix divide by zero error in build_clear_page() and build_copy_page() [MIPS] Fix typo in header guard [MIPS] Fix build error - Delete debugging crap that crept in with CMP [MIPS] Add accessors for random register. [MIPS] IP27: misc fixes [MIPS] IP27: Fix clockevent setup [MIPS] IP27: Fix bootmem memory setup [MIPS] remove CONFIG_CPU_R4000 line from Makefile [MIPS] Fix check for valid stack pointer during backtrace [MIPS] Add missing braces to pte_mkyoung [MIPS] R4700: Fix build_tlb_probe_entry [MIPS] Alchemy: dbdma: add API to delete custom DDMA device ids. [MIPS] Alchemy: export get_au1x00_speed for modules
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r--arch/mips/kernel/traps.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index cb8b0e2..f9165d1 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -88,15 +88,17 @@ static void show_raw_backtrace(unsigned long reg29)
#ifdef CONFIG_KALLSYMS
printk("\n");
#endif
-#define IS_KVA01(a) ((((unsigned int)a) & 0xc0000000) == 0x80000000)
- if (IS_KVA01(sp)) {
- while (!kstack_end(sp)) {
- addr = *sp++;
- if (__kernel_text_address(addr))
- print_ip_sym(addr);
+ while (!kstack_end(sp)) {
+ unsigned long __user *p =
+ (unsigned long __user *)(unsigned long)sp++;
+ if (__get_user(addr, p)) {
+ printk(" (Bad stack address)");
+ break;
}
- printk("\n");
+ if (__kernel_text_address(addr))
+ print_ip_sym(addr);
}
+ printk("\n");
}
#ifdef CONFIG_KALLSYMS
OpenPOWER on IntegriCloud