Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/um/kernel/tt
Bodo Stroesser 0f7e663dea [PATCH] uml: Fix process exit race
tt-mode closes switch_pipes in exit_thread_tt and kills processes in
switch_to_tt, if the exit_state is EXIT_DEAD or EXIT_ZOMBIE.

In very rare cases the exiting process can be scheduled out after having set
exit_state and closed switch_pipes (from release_task it calls proc_pid_flush,
which might sleep).  If this process is to be restarted, UML failes in
switch_to_tt with:

   write of switch_pipe failed, err = 9

We fix this by closing switch_pipes not in exit_thread_tt, but later in
release_thread_tt.  Additionally, we set switch_pipe[0] = 0 after closing.
switch_to_tt must not kill "from" process depending on its exit_state, but
must kill it after release_thread was processed only, so it examines
switch_pipe[0] for its decision.

Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06 22:09:30 -07:00
..
include [PATCH] uml: Fix process exit race 2005-05-06 22:09:30 -07:00
ptproxy
exec_kern.c
exec_user.c
gdb.c
gdb_kern.c
ksyms.c
Makefile
mem.c [PATCH] uml: Use CONFIG variable for address space size 2005-05-06 22:09:30 -07:00
mem_user.c
process_kern.c [PATCH] uml: Fix process exit race 2005-05-06 22:09:30 -07:00
syscall_kern.c
syscall_user.c [PATCH] uml: S390 preparation, save an extra register 2005-05-06 22:09:29 -07:00
time.c
tlb.c
tracer.c [PATCH] uml: Fix SIGWINCH relaying 2005-05-05 16:36:36 -07:00
trap_user.c
uaccess.c
uaccess_user.c
unmap.c