> On Jan 13, 2017, at 12:23 PM, Ben Pfaff <[email protected]> wrote:
> 
> On Thu, Jan 12, 2017 at 10:17:32AM -0800, Jarno Rajahalme wrote:
>> Use memory_order_release when updating the tables version number to
>> make sure no memory accesses before the atomic_store (possibly
>> relating to setting up the new version) are reordered to take place
>> after the atomic_store, which makes the new version available to other
>> threads.
>> 
>> Correspondingly, use memory_order_acquire when reading the
>> current tables_version to make sure no later memory accesses (possibly
>> relating to the current version) are reordered to take place before
>> the atomic_read to ensure that those memory accesses can not relate to
>> an older version than returned by the atomic_read.
>> 
>> Suggested-by: Daniele Di Proietto <[email protected]>
>> Signed-off-by: Jarno Rajahalme <[email protected]>
> 
> Is this a bug fix?

Yes, but IMO this bug has very low chance of causing problems.

> 
> Acked-by: Ben Pfaff <[email protected]>

Thanks, applied to master, branch-2.7, and branch-2.6.

  Jarno
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to