Messages in this thread | | | From | David Howells <> | Subject | Re: [patch 1/9] sys: Fix missing rcu protection for __task_cred() access | Date | Fri, 11 Dec 2009 13:45:20 +0000 |
| |
Thomas Gleixner <tglx@linutronix.de> wrote:
> > > Or are there updates that are carried out without write-holding > > > tasklist_lock that I am missing? > > > > Yes, commit_creds() is called lockless. > > Right, and that's what the problem is. commit_creds(), which rcu frees > the old creds, does not take tasklist lock write lock.
commit_creds() does not need to hold a write lock, because it is implicitly write-locked by only being permitted to run in the thread to which it is committing.
I don't think commit_creds() needs to take the RCU read lock as no-one else can alter/delete the creds it is dealing with.
David
| |