lkml.org 
[lkml]   [2011]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] vfork: make it killable
From
Date
On Fri, 2011-08-12 at 19:56 +0200, Oleg Nesterov wrote:
> 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 ->mm
> 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.

It's probably worth updating the comment above task_lock() in
include/linux/sched.h, to say that it is now used to protect
->vfork_done.



\
 
 \ /
  Last update: 2011-08-19 22:45    [from the cache]
©2003-2011 Jasper Spaans