Commit a6d5ff04 authored by David Daney's avatar David Daney Committed by Ralf Baechle
Browse files

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: default avatarFlorian Fainelli <florian@openwrt.org>
Signed-off-by: default avatarDavid Daney <ddaney@caviumnetworks.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent d0ce9a5a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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)