From 7adb67f18469e51cecb83a0c2efbf22494acb244 Mon Sep 17 00:00:00 2001 From: Hamish Guthrie Date: Thu, 28 May 2009 10:00:48 +0000 Subject: revert 15922 - add back 2.6.29 kernel support SVN-Revision: 16127 --- .../022-mips_force_sig_address_errors.patch | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch (limited to 'target/linux/generic-2.6/patches-2.6.29/022-mips_force_sig_address_errors.patch') 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..7d45fd99f4 --- /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 + +Signed-off-by: David Daney +--- + 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) -- cgit v1.2.3