public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
To: "Serge E. Hallyn" <serge.hallyn@ubuntu.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Richard Guy Briggs <rgb@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	linux-kernel@vger.kernel.org,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: Re: [RFC] is_global_init() called on global init sub-thread
Date: Fri, 1 Jan 2016 10:10:35 +0900	[thread overview]
Message-ID: <20160101011035.GA538@swordfish> (raw)
In-Reply-To: <20160101010823.GB26243@mail.hallyn.com>

On (12/31/15 19:08), Serge E. Hallyn wrote:
> > re-upping https://www.redhat.com/archives/linux-audit/2013-December/msg00086.html
> > 
> > Oleg Nesterov wrote:
> > 
> > :Because is_global_init() is only true for the main thread of /sbin/init.
> > :
> > :Just look at oom_unkillable_task(). It tries to not kill init. But, say,
> > :select_bad_process() can happily find a sub-thread of is_global_init()
> > :and still kill it.
> > 
> > this is still the case, isn't it? at least in some -stable kernels.
> > is there (or was there) any reason this change has never been committed?
> > (I'm particularly interested in is_global_init()).
> 
> ...  seems like it makes sense.  Can you remind us which init you're having
> to deal with?
> 

systemd

	-ss

> >  static inline int is_global_init(struct task_struct *tsk)
> >  {
> > -	return tsk->pid == 1;
> > +	return task_tgid_nr(tsk) == 1;
> >  }

  reply	other threads:[~2016-01-01  1:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30  6:25 [RFC] is_global_init() called on global init sub-thread Sergey Senozhatsky
2016-01-01  1:08 ` Serge E. Hallyn
2016-01-01  1:10   ` Sergey Senozhatsky [this message]
2016-01-01  1:18     ` Serge E. Hallyn
2016-01-01  1:33       ` Sergey Senozhatsky
2016-01-01  2:28         ` Serge E. Hallyn
2016-01-04  7:51         ` Richard Guy Briggs

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=20160101011035.GA538@swordfish \
    --to=sergey.senozhatsky@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rgb@redhat.com \
    --cc=serge.hallyn@ubuntu.com \
    --cc=serge@hallyn.com \
    --cc=sergey.senozhatsky.work@gmail.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