Ver Fonte

MIPS: Use force_sig when handling address errors.

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>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
David Daney há 16 anos atrás
pai
commit
a6d5ff04e8
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      arch/mips/kernel/unaligned.c

+ 3 - 3
arch/mips/kernel/unaligned.c

@@ -482,19 +482,19 @@ fault:
 		return;
 		return;
 
 
 	die_if_kernel("Unhandled kernel unaligned access", regs);
 	die_if_kernel("Unhandled kernel unaligned access", regs);
-	send_sig(SIGSEGV, current, 1);
+	force_sig(SIGSEGV, current);
 
 
 	return;
 	return;
 
 
 sigbus:
 sigbus:
 	die_if_kernel("Unhandled kernel unaligned access", regs);
 	die_if_kernel("Unhandled kernel unaligned access", regs);
-	send_sig(SIGBUS, current, 1);
+	force_sig(SIGBUS, current);
 
 
 	return;
 	return;
 
 
 sigill:
 sigill:
 	die_if_kernel("Unhandled kernel unaligned access or invalid instruction", regs);
 	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)
 asmlinkage void do_ade(struct pt_regs *regs)