* [uml-devel] [PATCH 7/7] UML - Improve SIGBUS diagnostics
@ 2006-07-28 3:06 Jeff Dike
0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2006-07-28 3:06 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, user-mode-linux-devel
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>
Index: linux-2.6.17/arch/um/kernel/trap.c
===================================================================
--- linux-2.6.17.orig/arch/um/kernel/trap.c 2006-07-12 10:47:56.000000000 -0400
+++ linux-2.6.17/arch/um/kernel/trap.c 2006-07-13 16:27:40.000000000 -0400
@@ -227,9 +227,16 @@ void bad_segv(struct faultinfo fi, unsig
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);
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-07-28 3:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-28 3:06 [uml-devel] [PATCH 7/7] UML - Improve SIGBUS diagnostics Jeff Dike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox