Skip to content

Commit

Permalink
[PATCH] uml: Improve SIGBUS diagnostics
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed Sep 26, 2006
1 parent 6b7aaad commit 6edf428
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions arch/um/kernel/trap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6edf428

Please sign in to comment.