Re: [PATCH v2] locking/mutex: Set and clear owner using WRITE_ONCE()

2016-05-20 Thread Waiman Long
On 05/20/2016 06:19 PM, Jason Low wrote: The mutex owner can get read and written to locklessly. Use WRITE_ONCE when setting and clearing the owner field in order to avoid optimizations such as store tearing. This avoids situations where the owner field gets written to with multiple stores and an

[PATCH v2] locking/mutex: Set and clear owner using WRITE_ONCE()

2016-05-20 Thread Jason Low
The mutex owner can get read and written to locklessly. Use WRITE_ONCE when setting and clearing the owner field in order to avoid optimizations such as store tearing. This avoids situations where the owner field gets written to with multiple stores and another thread could concurrently read and us