aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-05-06 21:27:28 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-05-06 21:27:28 +0000
commita55aaa9f3a25dcffe1699d4ef94664bc22a036c7 (patch)
treed14489e9521785a10ee99fac300d5c15a79b29b1 /target
parent3866201013508a41f2ebdd6a25fea7a0bbe64aec (diff)
downloadupstream-a55aaa9f3a25dcffe1699d4ef94664bc22a036c7.tar.gz
upstream-a55aaa9f3a25dcffe1699d4ef94664bc22a036c7.tar.bz2
upstream-a55aaa9f3a25dcffe1699d4ef94664bc22a036c7.zip
[kernel] use force_sig when handling address errors
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15642 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch b/target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch
new file mode 100644
index 0000000000..87e7159a03
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch
@@ -0,0 +1,45 @@
+When init is started it is SIGNAL_UNKILLABLE. If it were to get an
+address error, we would try to send it SIGBUS, but it would be ignored
+and the faulting instruction restarted. This results in an endless
+loop.
+
+We need to use force_sig() instead so it will actually die and give us
+some useful information.
+
+Reported-by: Florian Fainelli <florian@openwrt.org>
+
+Signed-off-by: David Daney <ddaney@caviumnetworks.com>
+---
+ arch/mips/kernel/unaligned.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
+index bf4c4a9..67bd626 100644
+--- a/arch/mips/kernel/unaligned.c
++++ b/arch/mips/kernel/unaligned.c
+@@ -482,19 +482,19 @@ fault:
+ return;
+
+ die_if_kernel("Unhandled kernel unaligned access", regs);
+- send_sig(SIGSEGV, current, 1);
++ force_sig(SIGSEGV, current);
+
+ return;
+
+ sigbus:
+ die_if_kernel("Unhandled kernel unaligned access", regs);
+- send_sig(SIGBUS, current, 1);
++ force_sig(SIGBUS, current);
+
+ return;
+
+ sigill:
+ die_if_kernel("Unhandled kernel unaligned access or invalid instruction", regs);
+- send_sig(SIGILL, current, 1);
++ force_sig(SIGILL, current);
+ }
+
+ asmlinkage void do_ade(struct pt_regs *regs)
+--
+1.6.0.6
+