[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110729142555.GC3501@redhat.com>
Date: Fri, 29 Jul 2011 16:25:55 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Matt Fleming <matt.fleming@...ux.intel.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Roland McGrath <roland@...k.frob.com>,
Tejun Heo <tj@...nel.org>,
Denys Vlasenko <dvlasenk@...hat.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/8] coredump_wait: don't call complete_vfork_done()
On 07/29, Matt Fleming wrote:
>
> On Wed, 2011-07-27 at 18:33 +0200, Oleg Nesterov wrote:
> > Now that CLONE_VFORK is killable, coredump_wait() no longer needs
> > complete_vfork_done(). zap_threads() should find and kill all tasks
> > with the same ->mm, this includes our parent if ->vfork_done is set.
> >
> > mm_release() becomes the only caller, unexport complete_vfork_done().
> >
> > Signed-off-by: Oleg Nesterov <oleg@...hat.com>
>
> Isn't there a subtle change in user-visible behaviour regarding wait()
> with this patch?
>
> Before the patch, if a child dumps its core it will wakeup the parent
> which can read the status of the child via wait(), whereas with this
> patch applied the parent will actually be killed along with the child.
No.
Please note that if ->vfork_done != NULL, then ->real_parent shares
->mm with us, by definition of CLONE_VFORK.
In this case, with or without this patch, the parent was already
killed by zap_threads(). It can never do wait() or something else.
However. before 3/8, it was necessary to wakeup the TASK_UNINTERRUPTIBLE
parent, otherwise we deadlock. Once again, it can't do anything,
it will die immediately because of fatal_signal_pending().
After 3/8, zap_process()->signal_wake_up(1) wakes up the KILLABLE
parent, no need to do complete().
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