From: Oleg Nesterov <oleg@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Oren Laadan <orenl@cs.columbia.edu>,
serue@us.ibm.com, Alexey Dobriyan <adobriyan@gmail.com>,
Containers <containers@lists.linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] Disable CLONE_PARENT for init
Date: Wed, 1 Jul 2009 10:24:52 +0200 [thread overview]
Message-ID: <20090701082452.GA3297@redhat.com> (raw)
In-Reply-To: <20090701074654.A6C6321D57@magilla.sf.frob.com>
On 07/01, Roland McGrath wrote:
>
> > When global or container-init processes use CLONE_PARENT, they create a
> > multi-rooted process tree.
>
> I take this to be the real motivation for your change.
> But you don't mention it in the code comment.
>
> > + * Swapper process sets the handler for SIGCHLD to SIG_DFL. If init
> > + * creates a sibling and the sibling exits, the SIGCHLD is sent to
> > + * the swapper (since the swapper's handler for SIGCHLD is SIG_DFL).
> > + * But since the swapper does not reap its children, the zombie will
> > + * remain forever. So prevent init from using CLONE_PARENT.
>
> This would be fixed by having swapper set its SIGCHLD to SIG_IGN instead,
> so such children self-reap. That seems like the better fix for that.
This won't fix the problem. The child won't autoreap itself if ->exit_signal
!= SIGCHLD.
> If you want to make this change because of container-init issues, I think
> you should just say so independent of this global-init case.
Yes, agreed, the comment looks confusing.
Oleg
next prev parent reply other threads:[~2009-07-01 8:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 7:31 [RFC][PATCH] Disable CLONE_PARENT for init Sukadev Bhattiprolu
2009-07-01 7:46 ` Roland McGrath
2009-07-01 8:01 ` Sukadev Bhattiprolu
2009-07-01 8:24 ` Oleg Nesterov [this message]
2009-07-01 21:48 ` Sukadev Bhattiprolu
2009-07-01 21:58 ` Roland McGrath
2009-07-02 0:35 ` Sukadev Bhattiprolu
2009-07-02 0:49 ` Roland McGrath
2009-07-02 7:58 ` Oleg Nesterov
2009-07-02 12:36 ` Oleg Nesterov
2009-07-01 23:27 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090701082452.GA3297@redhat.com \
--to=oleg@redhat.com \
--cc=adobriyan@gmail.com \
--cc=containers@lists.linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=orenl@cs.columbia.edu \
--cc=roland@redhat.com \
--cc=serue@us.ibm.com \
--cc=sukadev@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox