[ovs-dev] [PATCH 14/19] tunneling: Add missing rcu_dereference() to cache cleaner.

Jesse Gross jesse at nicira.com
Thu Dec 9 21:25:51 UTC 2010


On Thu, Dec 9, 2010 at 10:15 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Wed, Dec 08, 2010 at 10:14:12PM -0800, Jesse Gross wrote:
>> The cleaner for the header caching accesses the tunnel port table
>> without holding any locks.  However, it doesn't have a read memory
>> barrier, so there is no guarantee that the contents of the table
>> have made it to the right CPU.
>>
>> Found by sparse.
>>
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>
> Wow, I didn't know sparse could find this kind of thing.  It's magic!

If you use the __rcu annotations and CONFIG_SPARSE_RCU then it
complains when accessing a pointer directly, similar to __user or
__percpu.

In my branch of sparse/lockdep fixes I added all of these annotations.
 It's not quite ready yet to send out but I cherry-picked the actual
fixes onto this patch series.




More information about the dev mailing list