kernel-ark/arch/um/os-Linux
Paolo 'Blaisorblade' Giarrusso 5d48545e5e [PATCH] uml: make execvp safe for our usage
Reimplement execvp for our purposes - after we call fork() it is fundamentally
unsafe to use the kernel allocator - current is not valid there.  So we simply
pass to our modified execvp() a preallocated buffer.  This fixes a real bug
and works very well in testing (I've seen indirectly warning messages from the
forked thread - they went on the pipe connected to its stdout and where read
as a number by UML, when calling read_output().  I verified the obtained
number corresponded to "BUG:").

The added use of __cant_sleep() is not a new bug since __cant_sleep() is
already used in the same function - passing an atomicity parameter would be
better but it would require huge change, stating that this function must not
be called in atomic context and can sleep is a better idea (will make sure of
this gradually).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-25 13:28:34 -08:00
..
drivers
include
skas [PATCH] uml: include tidying 2006-11-03 12:27:59 -08:00
sys-i386
sys-x86_64
aio.c
elf_aux.c
execvp.c [PATCH] uml: make execvp safe for our usage 2006-11-25 13:28:34 -08:00
file.c
helper.c [PATCH] uml: make execvp safe for our usage 2006-11-25 13:28:34 -08:00
irq.c
main.c
Makefile [PATCH] uml: make execvp safe for our usage 2006-11-25 13:28:34 -08:00
mem.c
process.c [PATCH] uml: include tidying 2006-11-03 12:27:59 -08:00
sigio.c
signal.c
start_up.c
time.c
tls.c [PATCH] uml: include tidying 2006-11-03 12:27:59 -08:00
trap.c
tt.c
tty_log.c
tty.c
uaccess.c
umid.c
user_syms.c
util.c