All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <srostedt@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ftrace: do_each_pid_task() needs rcu lock
Date: Wed, 4 Feb 2009 01:12:43 +0100	[thread overview]
Message-ID: <20090204001243.GA6567@redhat.com> (raw)
In-Reply-To: <m1zlh3umho.fsf@fess.ebiederm.org>

On 02/03, Eric W. Biederman wrote:
>
> Oleg Nesterov <oleg@redhat.com> writes:
>
> > Yes, I thought about de_thread() too. But we can't "fix" do_each_pid_task()
> > to avoid the race?
>
> For the case of exec there is that.  There is also the case that
> ftrace unlike everything else wants to trace be able to trace all of
> the idle threads with pid 0.  I think that is a special case
> currently, but for that case the only correct version I can think
> of do_each_task_pid(), and current do_each_task_pid is wrong because
> it does not allow that.

Well, yes, I (partly) agree.

But, if we are talking about idle threads, we should change copy_process()
first. Because fork_idle()->copy_process(..., pid => init_struct_pid, ...)
means we don't really attach the idle thread to init_struct_pid.

I must admit, I think we should keep init_struct_pid "special" anyway,
but in any case you are right imho, there are nasty oddities here.

Oleg.


  reply	other threads:[~2009-02-04  0:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 19:39 [PATCH] ftrace: do_each_pid_task() needs rcu lock Oleg Nesterov
2009-02-03 19:42 ` Oleg Nesterov
2009-02-03 21:39   ` Eric W. Biederman
2009-02-03 22:28     ` Oleg Nesterov
2009-02-03 23:30       ` Eric W. Biederman
2009-02-04  0:12         ` Oleg Nesterov [this message]
2009-02-03 21:51 ` Ingo Molnar

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=20090204001243.GA6567@redhat.com \
    --to=oleg@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=srostedt@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.