Commit 6edf428e authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: Improve SIGBUS diagnostics

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: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6b7aaad9
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment