public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Ian Kent <raven@themaw.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	hpa@zytor.com, Cedric Le Goater <clg@fr.ibm.com>,
	Dave Hansen <haveblue@us.ibm.com>,
	Eric Biederman <ebiederm@xmission.com>,
	Pavel Emelyanov <xemul@openvz.org>,
	Serge Hallyn <serue@us.ibm.com>,
	Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] autofs4: turn ->oz_pgrp into "struct pid *"
Date: Fri, 23 Jan 2009 09:06:17 +0100	[thread overview]
Message-ID: <20090123080617.GA4002@redhat.com> (raw)
In-Reply-To: <1232686627.3011.26.camel@zeus.themaw.net>

On 01/23, Ian Kent wrote:
>
> On Sun, 2009-01-18 at 08:34 +0100, Oleg Nesterov wrote:
> >
> > I guess autofs4_show_options()->pid_vnr() is not exactly right, but hopefully
> > not worse than the current code.
>
> But shouldn't pid_vnr(sbi->oz_pgrp) report the pid as seen in the
> namespace of the calling process? In which case the only problem would
> be listing the mount table from a subordinate namespace that cannot see
> the process which did the mount, assuming fs namespace is not linked in
> some strict way to pid namespace, this could give an odd result. What
> might happen in this case Oleg?

Yes, nothing bad can happen. pid_vnr() just returns 0 if the calling
process can't see the namespace.

But I was worried about the case when, say, we are looking at
/subnamespace_root_mount/proc/mounts.

In that case pid_vnr() will report the pid_t in the global namespace,
this differs from the case when this file is read by its own namespace
as /proc/mounts.

I do not know whether this is right or not, though.

Oleg.


  reply	other threads:[~2009-01-23  8:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-18  7:34 [PATCH] autofs4: turn ->oz_pgrp into "struct pid *" Oleg Nesterov
2009-01-23  4:57 ` Ian Kent
2009-01-23  8:06   ` Oleg Nesterov [this message]
2009-01-23  9:13     ` Ian Kent
2009-01-23 11:51       ` Oleg Nesterov

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=20090123080617.GA4002@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=clg@fr.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=haveblue@us.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raven@themaw.net \
    --cc=serue@us.ibm.com \
    --cc=sukadev@linux.vnet.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