From: ebiederm@xmission.com (Eric W. Biederman)
To: Oleg Nesterov <oleg@redhat.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: Tue, 03 Feb 2009 13:39:44 -0800 [thread overview]
Message-ID: <m1fxivw673.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20090203194214.GA23703@redhat.com> (Oleg Nesterov's message of "Tue\, 3 Feb 2009 20\:42\:14 +0100")
Oleg Nesterov <oleg@redhat.com> writes:
> On 02/03, Oleg Nesterov wrote:
>>
>> "ftrace: use struct pid" commit 978f3a45d9499c7a447ca7615455cefb63d44165
>> converted ftrace_pid_trace to "struct pid*". But we can't use
>> do_each_pid_task() without rcu_read_lock() even if we know the pid
>> itself can't go away (it was pinned in ftrace_pid_write). The exiting
>> task can detach itself from this pid at any moment.
>
> Q: why do we use do_each_pid_task(PIDTYPE_PID) ? We can never have more
> than 1 task in the loop. Perhaps,
That is a bug in do_each_pid_task(PIDTYPE_PID).
For ftrace we really want to grab all tasks with a given pid even
in the crazy exec case.
Eric
next prev parent reply other threads:[~2009-02-03 21:39 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 [this message]
2009-02-03 22:28 ` Oleg Nesterov
2009-02-03 23:30 ` Eric W. Biederman
2009-02-04 0:12 ` Oleg Nesterov
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=m1fxivw673.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox