]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] uml: Improve SIGBUS diagnostics
authorJeff Dike <jdike@addtoit.com>
Tue, 26 Sep 2006 06:33:03 +0000 (23:33 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:49:07 +0000 (08:49 -0700)
UML can get a SIGBUS anywhere if the tmpfs mount being used for its memory
runs out of space.  This patch adds a printk before the panic to provide a
clue as to what likely went wrong.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/kernel/trap.c

index ac70fa5a2e2aa8e70ecf9688dfc7a8aec1a730fd..e5eeaf2b6af118c33401528a0e03ff206af15ed9 100644 (file)
@@ -227,9 +227,16 @@ void bad_segv(struct faultinfo fi, unsigned long ip)
 
 void relay_signal(int sig, union uml_pt_regs *regs)
 {
-       if(arch_handle_signal(sig, regs)) return;
-       if(!UPT_IS_USER(regs))
+       if(arch_handle_signal(sig, regs))
+               return;
+
+       if(!UPT_IS_USER(regs)){
+               if(sig == SIGBUS)
+                       printk("Bus error - the /dev/shm or /tmp mount likely "
+                              "just ran out of space\n");
                panic("Kernel mode signal %d", sig);
+       }
+
         current->thread.arch.faultinfo = *UPT_FAULTINFO(regs);
        force_sig(sig, current);
 }