diff mbox

[5/9] powerpc: Don't silently handle machine checks from userspace

Message ID 20110112164814.4f6e27f4@kryten (mailing list archive)
State Accepted, archived
Commit e49b1fae0ba4d06b29bd753a961abb447566bf4a
Delegated to: Benjamin Herrenschmidt
Headers show

Commit Message

Anton Blanchard Jan. 12, 2011, 5:48 a.m. UTC
If a machine check comes from userspace we send a SIGBUS to the task and
fail to printk anything.

If we are taking machine checks due to bad hardware we want to know about
it right away. Furthermore if we don't complain loudly then it will look
a lot like a bug in the userspace application, potentially causing a lot
of confusion.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

I seem to remember this might be here for X on 32bit. If necessary I can
wrap it in an ifdef CONFIG_PPC32.
diff mbox

Patch

Index: powerpc.git/arch/powerpc/kernel/traps.c
===================================================================
--- powerpc.git.orig/arch/powerpc/kernel/traps.c	2011-01-11 13:46:47.391281975 +1100
+++ powerpc.git/arch/powerpc/kernel/traps.c	2011-01-11 13:46:49.141336198 +1100
@@ -626,11 +626,6 @@  void machine_check_exception(struct pt_r
 	if (recover > 0)
 		return;
 
-	if (user_mode(regs)) {
-		_exception(SIGBUS, regs, BUS_ADRERR, regs->nip);
-		return;
-	}
-
 #if defined(CONFIG_8xx) && defined(CONFIG_PCI)
 	/* the qspan pci read routines can cause machine checks -- Cort
 	 *