Re: [PATCH] TOMOYO: Protect find_task_by_vpid() with RCU.

From: James Morris
Date: Wed Feb 24 2010 - 22:16:55 EST


On Thu, 25 Feb 2010, Tetsuo Handa wrote:

> James Morris wrote:
> > On Wed, 24 Feb 2010, Tetsuo Handa wrote:
> >
> > > Caller of find_task_by_vpid() must use rcu_read_lock().
> >
> > The comment for the function says:
> >
> > Must be called under rcu_read_lock() or with tasklist_lock read-held.
> >
> > In the cases below, you have taken tasklist_lock.
>
> That comment will be updated to
> "Must be called under rcu_read_lock()." in 2.6.34 .
> Please see http://lkml.org/lkml/2009/12/10/180 and http://lkml.org/lkml/2009/12/9/472 .

Ok, please fix the comment as well.

Thomas: wasn't Tetsuo correct that we need both the rcu lock and
tasklist_lock held to call this?

Also, I think the audit code needs fixing.


--
James Morris
<jmorris@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/