[ovs-dev] [PATCH 15/19] datapath: Don't rcu_dereference() objects in table.

Ben Pfaff blp at nicira.com
Thu Dec 9 18:15:51 UTC 2010


On Wed, Dec 08, 2010 at 10:14:13PM -0800, Jesse Gross wrote:
> Each time that we modify the flow/port table, we reallocate the
> array of pointers to objects in a particular bucket.  We then use
> RCU to update the link to that bucket.  This means that we don't
> need to use RCU to access the individual object pointers, since
> they are constant for a given instance of the bucket data structure.
> This doesn't cause a problem per se (though it does restrict the
> optimizations that the compiler can perform and adds a memory barrier
> on Alpha).  However, it is confusing and inconsistent since the
> pointers are not protected by RCU and we don't use rcu_assign_pointer().
> 
> Found by sparse.
> 
> Signed-off-by: Jesse Gross <jesse at nicira.com>

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




More information about the dev mailing list