From: ebiederm@xmission.com (Eric W. Biederman)
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] introduce get_task_pid() to fix unsafe get_pid()
Date: Sun, 10 Sep 2006 22:59:37 -0600 [thread overview]
Message-ID: <m1mz97athi.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20060911043751.GA7320@oleg> (Oleg Nesterov's message of "Mon, 11 Sep 2006 08:37:51 +0400")
Oleg Nesterov <oleg@tv-sign.ru> writes:
> On 09/10, Eric W. Biederman wrote:
>>
>> As for the functions can we build them in all 4 varieties.
>> struct pid *get_task_pid(struct task *);
>> struct pid *get_task_tgid(struct task *);
>> struct pid *get_task_pgrp(struct task *);
>> struct pid *get_task_session(struct task *);
>
> Something like the patch below?
Yes something like that. Although it doesn't provide for the
get_task_tgid case, and your patch only get_task_pid.
>> Either that or we can just drop in some rcu_read_lock() rcu_read_unlock()
>> into the call sites.
>
> Possible. I don't have a strong opinion, please feel free to send
> a different patch.
I just might. Coming up with an idiom that is hard to get wrong,
is desirable here, or at least with an idiom that is consistent.
I need to sleep on it before I can answer which way we handle that.
The pain with a new idiom is that I will have to update all of the
users so all of the examples in the kernel are consistent.
I might just need to do that anyway, but...
Eric
prev parent reply other threads:[~2006-09-11 5:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-11 2:25 [PATCH] introduce get_task_pid() to fix unsafe get_pid() Oleg Nesterov
2006-09-11 3:58 ` Eric W. Biederman
2006-09-11 4:37 ` Oleg Nesterov
2006-09-11 4:59 ` 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=m1mz97athi.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@tv-sign.ru \
/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