Re: [PATCH 1/2] device_cgroup: fix RCU usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 06, 2012 at 11:48:41AM -0600, Serge Hallyn wrote:
> Quoting Tejun Heo (tj@xxxxxxxxxx):
> > dev_cgroup->exceptions is protected with devcgroup_mutex for writes
> > and RCU for reads; however, RCU usage isn't correct.
> > 
> > * dev_exception_clean() doesn't use RCU variant of list_del() and
> >   kfree().  The function can race with may_access() and may_access()
> >   may end up dereferencing already freed memory.  Use list_del_rcu()
> >   and kfree_rcu() instead.
> > 
> > * may_access() may be called only with RCU read locked but doesn't use
> >   RCU safe traversal over ->exceptions.  Use list_for_each_entry_rcu().
> > 
> > Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> > Cc: stable@xxxxxxxxxxxxxxx
> > Cc: Aristeu Rozanski <aris@xxxxxxxxxx>
> > Cc: Li Zefan <lizefan@xxxxxxxxxx>
> > Cc: Serge E. Hallyn <serge.hallyn@xxxxxxxxxx>
> 
> Acked-by: Serge E. Hallyn <serge.hallyn@xxxxxxxxxx>

Thanks, applied to cgroup/for-3.7-fixes.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux