* [PATCH] MIPS: Use force_sig when handling address errors.
@ 2009-05-05 19:49 David Daney
2009-05-05 20:32 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: David Daney @ 2009-05-05 19:49 UTC (permalink / raw)
To: linux-mips, ralf, florian; +Cc: David Daney
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
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] MIPS: Use force_sig when handling address errors.
2009-05-05 19:49 [PATCH] MIPS: Use force_sig when handling address errors David Daney
@ 2009-05-05 20:32 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2009-05-05 20:32 UTC (permalink / raw)
To: David Daney; +Cc: linux-mips, florian
On Tue, May 05, 2009 at 12:49:47PM -0700, David Daney wrote:
> 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>
Thanks! Will apply.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-05 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-05 19:49 [PATCH] MIPS: Use force_sig when handling address errors David Daney
2009-05-05 20:32 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.