From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org,
Linux Containers <containers@lists.osdl.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] vt: Rework the console spawning variables.
Date: Mon, 11 Sep 2006 05:05:34 +0400 [thread overview]
Message-ID: <20060911010534.GA108@oleg> (raw)
In-Reply-To: <m1slizcouy.fsf@ebiederm.dsl.xmission.com>
On 09/10, Eric W. Biederman wrote:
>
> Ok. I think I see the where the confusion is. We were looking
> at different parts of the puzzle. But I we need to resolve this
> to make certain I didn't do something clever and racy.
Yes, I think we misunderstood each other :)
> As for the rest of your suggestion it would not be hard to be able to
> follow a struct pid pointer in an rcu safe way, and we do in the pid
> hash table. In other contexts so far I always have other variables
> that need to be updated in concert, so there isn't a point in coming
> up with a lockless implementation. I believe vt_pid is the only
> case that I have run across where this is a problem and I have
> at least preliminary patches for every place where signals are
> sent.
>
> Updating this old code is painful.
No, no, we shouldn't change the old code, it is fine.
Just in case, to avoid any possible confusion.
put_pid(pid) has the following restrictions. The caller should ensure
that any other possible reference to this pid "owns" it (did get_pid()).
So we can add a new helper, put_pid_rcu(). It is ok if this pid is used
in parallel under rcu_read_lock() without bumping pid->count. Contrary,
the only restriction those users must not call get_pid(pid).
But yes, you are right, I don't see an immediate usage of put_pid_rcu().
Oleg.
next prev parent reply other threads:[~2006-09-11 1:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-10 4:21 [PATCH] vt: Rework the console spawning variables Eric W. Biederman
2006-09-10 14:29 ` Oleg Nesterov
2006-09-10 20:10 ` Eric W. Biederman
2006-09-10 20:33 ` Oleg Nesterov
2006-09-10 22:56 ` Eric W. Biederman
2006-09-11 1:05 ` Oleg Nesterov [this message]
2006-09-11 2:40 ` Eric W. Biederman
2006-09-11 2:59 ` Oleg Nesterov
2006-09-11 5:01 ` Eric W. Biederman
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=20060911010534.GA108@oleg \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=containers@lists.osdl.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.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 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.