mirror of
https://github.com/torvalds/linux.git
synced 2024-12-13 22:53:20 +00:00
5d48545e5e
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>
29 lines
846 B
Makefile
29 lines
846 B
Makefile
#
|
|
# Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
|
|
# Licensed under the GPL
|
|
#
|
|
|
|
obj-y = aio.o elf_aux.o execvp.o file.o helper.o irq.o main.o mem.o process.o \
|
|
sigio.o signal.o start_up.o time.o trap.o tty.o uaccess.o umid.o tls.o \
|
|
user_syms.o util.o drivers/ sys-$(SUBARCH)/
|
|
|
|
obj-$(CONFIG_MODE_SKAS) += skas/
|
|
|
|
obj-$(CONFIG_MODE_TT) += tt.o
|
|
user-objs-$(CONFIG_MODE_TT) += tt.o
|
|
|
|
obj-$(CONFIG_TTY_LOG) += tty_log.o
|
|
user-objs-$(CONFIG_TTY_LOG) += tty_log.o
|
|
|
|
USER_OBJS := $(user-objs-y) aio.o elf_aux.o execvp.o file.o helper.o irq.o \
|
|
main.o mem.o process.o sigio.o signal.o start_up.o time.o trap.o tty.o \
|
|
tls.o uaccess.o umid.o util.o
|
|
|
|
CFLAGS_user_syms.o += -DSUBARCH_$(SUBARCH)
|
|
|
|
HAVE_AIO_ABI := $(shell [ -r /usr/include/linux/aio_abi.h ] && \
|
|
echo -DHAVE_AIO_ABI )
|
|
CFLAGS_aio.o += $(HAVE_AIO_ABI)
|
|
|
|
include arch/um/scripts/Makefile.rules
|