The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Pavel Emelyanov <xemul@openvz.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] teach set_special_pids() to use struct pid
Date: Mon, 26 Nov 2007 14:42:33 -0700	[thread overview]
Message-ID: <m1myt0n0om.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20071126201757.GB84@tv-sign.ru> (Oleg Nesterov's message of "Mon, 26 Nov 2007 23:17:57 +0300")

Oleg Nesterov <oleg@tv-sign.ru> writes:

> On 11/26, Eric W. Biederman wrote:
>>
>> Oleg Nesterov <oleg@tv-sign.ru> writes:
>> 
>> > -	set_special_pids(1, 1);
>> > +	if (current->nsproxy != &init_nsproxy) {
>> > +		get_nsproxy(&init_nsproxy);
>> > +		switch_task_namespaces(current, &init_nsproxy);
>> > +	}
>> 
>> Is there a reason for moving this hunk of code?
>> 
>> I don't see one as set_special_pids does everything with either
>> struct pid or global pid values.  And attach_pid and detach_pid
>> don't care.
>
> No particular reason, except "keep related code together".
>
> There was another minor reason. Without the next patch we are doing find_pid(1).
> This is correct, we scan the global namespace, but still it looks a bit tidier
> to switch namespace first, so we could use find_vpid() in unlikely case we need
> it.

True.  I just pointed it out because it seemed an unnecessary chunk.
Regardless it is harmless either way.

Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>

Eric

      reply	other threads:[~2007-11-26 21:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-26 14:25 [PATCH 2/3] teach set_special_pids() to use struct pid Oleg Nesterov
2007-11-26 15:02 ` Pavel Emelyanov
2007-11-26 18:51 ` Eric W. Biederman
2007-11-26 20:17   ` Oleg Nesterov
2007-11-26 21:42     ` Eric W. Biederman [this message]

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=m1myt0n0om.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --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