This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix sem_post race (bug 14532)
- From: Chris Metcalf <cmetcalf at tilera dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 31 Aug 2012 13:08:24 -0400
- Subject: Re: Fix sem_post race (bug 14532)
- References: <Pine.LNX.4.64.1208302108250.15919@digraph.polyomino.org.uk>
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.
--
Chris Metcalf, Tilera Corp.
http://www.tilera.com