public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: paulmck@linux.vnet.ibm.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>, Pavel Emelyanov <xemul@openvz.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix tasklist + find_pid() with CONFIG_PREEMPT_RCU
Date: Wed, 30 Jan 2008 12:48:01 +0300	[thread overview]
Message-ID: <20080130094801.GA143@tv-sign.ru> (raw)
In-Reply-To: <m163xbhdq5.fsf@ebiederm.dsl.xmission.com>

On 01/30, Eric W. Biederman wrote:
>
> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> writes:
> 
> > On Tue, Jan 29, 2008 at 08:24:17PM -0700, Eric W. Biederman wrote:
> >> 
> >> Using the tasklist_lock to still guarantee we see the list, the entire
> >> list, and exactly the list for proper implementation of kill to
> >> process groups and sessions still seems sane.
> >> 
> >> So let's just remove the guarantee of find_pid being usable with
> >> just the tasklist_lock held.
> >
> > Makes sense to me -- it is totally permissible to hold rcu_read_lock()
> > across update code.  ;-)
> 
> Let me rephrase so it is clear.
> 
> When dealing with pids there is exactly one case where we need
> to take read_lock(&tasklist_lock);

Well, another example is sys_ioprio_set(IOPRIO_WHO_PGRP),

> Posix (and sanely handling corner cases) requires that when we send a
> signal to a process group or a session we have a snapshot in time view
> of the entire group.  In particular this allows us to send SIGKILL to
> every member of the group and to have the entire group die.

but you are right of course. tasklist pins group/session/->tasks.

Oleg.


  reply	other threads:[~2008-01-30  9:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 16:40 [PATCH] fix tasklist + find_pid() with CONFIG_PREEMPT_RCU Oleg Nesterov
2008-01-29 23:02 ` Andrew Morton
2008-01-30 14:17   ` Peter Zijlstra
2008-01-31 13:32   ` Ingo Molnar
2008-01-29 23:08 ` Andrew Morton
2008-01-30  2:16   ` Eric W. Biederman
2008-01-30  4:56     ` Paul E. McKenney
2008-01-30  3:24 ` Eric W. Biederman
2008-01-30  5:00   ` Paul E. McKenney
2008-01-30  9:20     ` Eric W. Biederman
2008-01-30  9:48       ` Oleg Nesterov [this message]
2008-01-30  9:30   ` Oleg Nesterov
2008-01-30 18:28     ` Eric W. Biederman
2008-01-31  9:31       ` Oleg Nesterov
  -- strict thread matches above, loose matches on Subject: below --
2009-12-14  2:15 Tetsuo Handa

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=20080130094801.GA143@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@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