mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, haveblue@us.ibm.com,
	serue@us.ibm.com, clg@fr.ibm.com,
	lxc-devel@lists.sourceforge.net
Subject: Re: [RFC] [PATCH] pidspace: is_init()
Date: Wed, 09 Aug 2006 02:01:47 -0600	[thread overview]
Message-ID: <m14pwm5od0.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20060804224105.GA19866@us.ibm.com> (Sukadev Bhattiprolu's message of "Fri, 4 Aug 2006 15:41:05 -0700")

Sukadev Bhattiprolu <sukadev@us.ibm.com> writes:

> This is an updated version of Eric Biederman's is_init() patch.
> (http://lkml.org/lkml/2006/2/6/280). It applies cleanly to 2.6.18-rc2
> and replaces a few more instances of ->pid == 1 with is_init().
>
> Further, is_init() checks pid and thus removes dependency on Eric's
> other patches for now.

Sorry for the delay.  I've been catching up on other things before
I dived back in.

> Couple of questions:
>
> 	Are there cases where child_reaper is not pid = 1. Should the
> 	"tsk == child_reaper" check in do_exit() be replaced with is_init() ? 

There are cases where there are multiple child_reapers.
So is_init() is not the right test there.

There is a really weird case when you have a threaded init and the primary
thread exits where things get weird.  As I recall there wind up being two
tasks with tgid == 1 and pid == 1.  So simply testing the pid is not
sufficient.

> 	Looks like, we would need a similar, is_idle() wrapper for "pid==0"
> 	checks - although the name is_idle_task() maybe more intuitive. If
> 	so, should we rename is_init() to is_init_task() ? 

Whatever works.  I'm not too particular as long as the important bits happen.
However pid == 0 only ever lives in the root pspace and never shows up in
the pid hash tables so we can get away without a special check.

Eric

      reply	other threads:[~2006-08-09  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-04 22:41 Sukadev Bhattiprolu
2006-08-09  8:01 ` 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=m14pwm5od0.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=clg@fr.ibm.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lxc-devel@lists.sourceforge.net \
    --cc=serue@us.ibm.com \
    --cc=sukadev@us.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

Powered by JetHome