Fix sem_post race (bug 14532)

Chris Metcalf cmetcalf@tilera.com
Fri Aug 31 19:36:00 GMT 2012


On 8/31/2012 2:45 PM, Joseph S. Myers wrote:
> On Fri, 31 Aug 2012, Chris Metcalf wrote:
>
>> On 8/30/2012 5:09 PM, Joseph S. Myers wrote:
>>> Bug 14532 is a race condition in sem_post (generic C version), where
>>> it wrongly uses an acquire barrier rather than a release barrier, so
>>> wrongly allowing memory operations from before the unlock to be moved
>>> after it.
>>>
>>> This patch fixes this in the obvious way and adds a testcase.  Tested
>>> mips64.
>> This bug is also present on tilegx, and fixed by your patch.
> Do you think the patch is OK, then?  If so, I'll commit it.

Yes, please do.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com



More information about the Libc-alpha mailing list