[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110822133540.GA28724@redhat.com>
Date: Mon, 22 Aug 2011 15:35:40 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Matt Fleming <matt.fleming@...el.com>
Cc: Tejun Heo <tj@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Roland McGrath <roland@...k.frob.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-kernel@...r.kernel.org, Pavel Machek <pavel@....cz>
Subject: Re: [PATCH 2/3] vfork: make it killable
On 08/19, Matt Fleming wrote:
>
> 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.
OK, added
@@ -2335,7 +2335,7 @@ static inline int thread_group_empty(struct task_struct *p)
* Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring
* subscriptions and synchronises with wait4(). Also used in procfs. Also
* pins the final release of task.io_context. Also protects ->cpuset and
- * ->cgroup.subsys[].
+ * ->cgroup.subsys[]. And ->vfork_done.
*
* Nests both inside and outside of read_lock(&tasklist_lock).
* It must not be nested with write_lock_irq(&tasklist_lock),
to this patch, and pushed 1-4 into ptrace branch.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists