[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110920153542.GA17731@redhat.com>
Date: Tue, 20 Sep 2011 17:35:42 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Serge Hallyn <serge.hallyn@...onical.com>
Cc: "Serge E. Hallyn" <serge@...lyn.com>,
Andrew Morton <akpm@...ux-foundation.org>,
David Howells <dhowells@...hat.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
lkml <linux-kernel@...r.kernel.org>, richard@....at,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH 2/2] creds: __task_cred(current) doesn't need
rcu_read_lock_held()
On 09/20, Serge Hallyn wrote:
>
> Quoting Oleg Nesterov (oleg@...hat.com):
> > Change __task_cred(task) to accept "task == current" without
> > rcu_read_lock_held(). This is what current_cred() currently does,
> > and with this change __task_cred() becomes more flexible/usable.
> >
> > Signed-off-by: Oleg Nesterov <oleg@...hat.com>
>
> So to check whether I've got this straight, the original __task_cred()
> was allowing rcu read lock to not be held for a non-running task, but
> required rcu read lock if task was running? With these two patches,
> rcu read lock will not be needed if task == current?
Yes.
> If so, then that sounds good to me, and an unconditional rcu_read_lock()
> at wait_task_zombie() seems better than at send_signal()...
Agreed.
Although sometimes I think it would be better to use rcu_dereference_raw()
with a comment in some places.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists