[ovs-dev] [PATCH 07/12] datapath: Don't directly access RCU protected pointers.

Ben Pfaff blp at nicira.com
Mon Dec 13 18:55:17 UTC 2010


On Sun, Dec 12, 2010 at 12:53:02PM -0800, Jesse Gross wrote:
> If RTNL lock is used to protected updates to RCU data structures
> then it isn't necessary to use rcu_dereference() to access them if
> RTNL is held.  This adds rtnl_dereference() to access these pointers
> which has several benefits: documents the locking expectations;
> checks that RTNL actually is held when run with lockdep; makes
> sparse not complain about directly accessing RCU pointers.
> 
> Signed-off-by: Jesse Gross <jesse at nicira.com>

Acked-by: Ben Pfaff <blp at nicira.com>




More information about the dev mailing list