[ovs-dev] rcu dereference warnings

Ben Pfaff blp at nicira.com
Mon Dec 6 19:11:56 UTC 2010


On Mon, Dec 06, 2010 at 11:09:46AM -0800, Jesse Gross wrote:
> I think the right solution is to backport and use
> rcu_dereference_rtnl() from 2.6.37 (I know it's not released yet but
> it is very nice functionality and I'm pretty sure it is going to be
> part of the kernel in the near future).  This will check that we hold
> either RCU read lock or RTNL, which is what we need here.
> 
> I have a branch of cleanups for sparse warnings and I've been adding
> usage of both this and rtnl_dereference() (which makes sparse not
> complain about pointers decorated with __rcu that are accessed
> directly under RTNL).  I haven't done the backporting or dealt with
> issues like this yet though.

Sounds like a good plan, thanks for the info.




More information about the dev mailing list