another mips build error *sigh*

svn path=/dists/trunk/linux-2.6/; revision=11526
This commit is contained in:
Martin Michlmayr 2008-06-05 11:58:51 +00:00
parent 308763f3e6
commit ec6d757afa
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,45 @@
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Date: Mon, 12 May 2008 15:58:48 +0000 (+0200)
Subject: [MIPS] Fix check for valid stack pointer during backtrace
X-Git-Tag: linux-2.6.26-rc3~2
X-Git-Url: http://www.linux-mips.org/git?p=linux.git;a=commitdiff_plain;h=777f5acbe483e96c0b96f54446423064da82d0b7
[MIPS] Fix check for valid stack pointer during backtrace
The newly added check for valid stack pointer address breaks at least for
64bit kernels. Use __get_user() for accessing stack content to avoid crashes,
when doing the backtrace.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
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

View File

@ -36,3 +36,4 @@
+ features/all/0001-iwlwifi-Set-monitor-mode-for-3945.patch
+ bugfix/mips/ext4-build-fix.patch
+ bugfix/mips/malta-build-fix.patch
+ bugfix/mips/traps-build-fix.patch