Files
ack-tegra/include/linux
Oleg Nesterov d68b46fe16 vfork: make it killable
Make vfork() killable.

Change do_fork(CLONE_VFORK) to do wait_for_completion_killable().  If it
fails we do not return to the user-mode and never touch the memory shared
with our child.

However, in this case we should clear child->vfork_done before return, we
use task_lock() in do_fork()->wait_for_vfork_done() and
complete_vfork_done() to serialize with each other.

Note: now that we use task_lock() we don't really need completion, we
could turn task->vfork_done into "task_struct *wake_up_me" but this needs
some complications.

NOTE: this and the next patches do not affect in-kernel users of
CLONE_VFORK, kernel threads run with all signals ignored including
SIGKILL/SIGSTOP.

However this is obviously the user-visible change.  Not only a fatal
signal can kill the vforking parent, a sub-thread can do execve or
exit_group() and kill the thread sleeping in vfork().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-05 15:49:42 -08:00
..
2012-01-22 15:08:43 -05:00
2012-01-10 16:30:42 -08:00
2012-01-03 22:54:57 -05:00
2012-02-20 19:46:36 +11:00
2012-01-04 08:56:31 -06:00
2012-01-12 20:13:04 -08:00
2012-01-03 22:54:58 -05:00
2012-01-12 20:13:08 -08:00
2012-01-03 22:54:56 -05:00
2012-01-03 22:55:17 -05:00
2012-01-09 13:52:09 +01:00
2012-01-17 15:40:51 -08:00
2012-01-12 20:13:10 -08:00
2012-01-06 12:10:26 -08:00
2012-01-12 15:23:04 -08:00
2012-01-03 22:55:07 -05:00
2012-01-03 22:54:56 -05:00
2012-03-05 15:49:42 -08:00
2012-01-03 22:52:40 -05:00
2012-01-09 09:33:57 +09:00
2012-01-03 22:54:56 -05:00
2012-01-24 12:25:14 -08:00