diff options
author | hcg <hcg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-05-28 10:00:48 +0000 |
---|---|---|
committer | hcg <hcg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-05-28 10:00:48 +0000 |
commit | c5a9834bb42c45e2bd0873fa409cb8e7ea7badf2 (patch) | |
tree | 6527b3196b8418cb3359748a798c79644d18faf8 /target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch | |
parent | c57c9b688ba29ea6ef6cb05a25a245c002d53949 (diff) |
[kernel] revert 15922 - add back 2.6.29 kernel support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16127 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch')
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch | 40 |
1 files changed, 40 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 000000000..7d45fd99f --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch @@ -0,0 +1,40 @@ +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(-) + +--- 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) |