diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-09-26 02:33:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:49:07 -0400 |
commit | 6edf428ed177e333863a8e5c37751a9ec176f241 (patch) | |
tree | cf7f3e70f4898d55dbbdbd982353057e4ef3babd /arch/um | |
parent | 6b7aaad9ba4f2a059a70014be12a921eceebfc47 (diff) |
[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: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/trap.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c index ac70fa5a2e2a..e5eeaf2b6af1 100644 --- a/arch/um/kernel/trap.c +++ b/arch/um/kernel/trap.c | |||
@@ -227,9 +227,16 @@ void bad_segv(struct faultinfo fi, unsigned long ip) | |||
227 | 227 | ||
228 | void relay_signal(int sig, union uml_pt_regs *regs) | 228 | void relay_signal(int sig, union uml_pt_regs *regs) |
229 | { | 229 | { |
230 | if(arch_handle_signal(sig, regs)) return; | 230 | if(arch_handle_signal(sig, regs)) |
231 | if(!UPT_IS_USER(regs)) | 231 | return; |
232 | |||
233 | if(!UPT_IS_USER(regs)){ | ||
234 | if(sig == SIGBUS) | ||
235 | printk("Bus error - the /dev/shm or /tmp mount likely " | ||
236 | "just ran out of space\n"); | ||
232 | panic("Kernel mode signal %d", sig); | 237 | panic("Kernel mode signal %d", sig); |
238 | } | ||
239 | |||
233 | current->thread.arch.faultinfo = *UPT_FAULTINFO(regs); | 240 | current->thread.arch.faultinfo = *UPT_FAULTINFO(regs); |
234 | force_sig(sig, current); | 241 | force_sig(sig, current); |
235 | } | 242 | } |