From: Oleg Nesterov <oleg@tv-sign.ru>
To: sukadev@us.ibm.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Pavel Emelyanov <xemul@openvz.org>,
Robert Rex <robert.rex@exasol.com>,
Roland McGrath <roland@redhat.com>,
Serge Hallyn <serue@us.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] pid_ns: (BUG 11391) change ->child_reaper when init->group_leader exits
Date: Wed, 27 Aug 2008 21:06:48 +0400 [thread overview]
Message-ID: <20080827170648.GC97@tv-sign.ru> (raw)
In-Reply-To: <20080827003524.GA22580@us.ibm.com>
On 08/26, sukadev@us.ibm.com wrote:
>
> sukadev@us.ibm.com [sukadev@us.ibm.com] wrote:
> | I was able to repro the problem without the patchset and could not
> | reproduce with the patchset. But just had a quick question while
> | reviewing the patches.
> |
> | Oleg Nesterov [oleg@tv-sign.ru] wrote:
> | | We don't change pid_ns->child_reaper when the main thread of the
> | | subnamespace init exits. As Robert Rex <robert.rex@exasol.com>
> | | pointed out this is wrong.
> | |
> | | Yes, the re-parenting itself works correctly, but if the reparented
> | | task exits it needs ->parent->nsproxy->pid_ns in do_notify_parent(),
> |
> | If the task was reparented, then with patch 1/4 its parent would be
> | the global init (init_pid_ns.child_reaper) right ?
> |
> | | and if the main thread is zombie its ->nsproxy was already cleared
> | | by exit_task_namespaces().
> |
> | If above is true, then even if the main thread's nsproxy is NULL, does
> | it affect the reparented task ?
>
> never mind. I see it now. The group_dead check in current code is not
> sufficient (and the zap_pid_ns() may not have been called when main
> thread is exiting).
Yes.
BTW, your original patch (which introduced zap_pid_ns()) was correct ;)
The code was broken later, during the s/->pid/vpid/ conversion.
The group_dead check _is_ sufficient (and correct) for zap_pid_ns(),
but we all missed the simple fact: if we continue to re-parent to
some task, it must have the valid ->nsproxy->pid_ns. Thanks to Robert
again.
Oleg.
next prev parent reply other threads:[~2008-08-27 17:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-24 15:49 [PATCH 2/4] pid_ns: (BUG 11391) change ->child_reaper when init->group_leader exits Oleg Nesterov
2008-08-26 23:33 ` sukadev
2008-08-27 0:35 ` sukadev
2008-08-27 17:06 ` Oleg Nesterov [this message]
2008-08-27 2:24 ` Serge E. Hallyn
2008-08-27 11:38 ` Pavel Emelyanov
2008-08-27 18:04 ` sukadev
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=20080827170648.GC97@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robert.rex@exasol.com \
--cc=roland@redhat.com \
--cc=serue@us.ibm.com \
--cc=sukadev@us.ibm.com \
--cc=xemul@openvz.org \
/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