[COMMITTED 2.27 / 2.28] Fix race in pthread_mutex_lock while promoting to PTHREAD_MUTEX_ELISION_NP [BZ #23275]

Stefan Liebler stli@linux.ibm.com
Thu Oct 18 13:24:00 GMT 2018


On 10/17/2018 12:28 PM, Stefan Liebler wrote:
> On 10/16/2018 03:01 PM, Florian Weimer wrote:
>> * Stefan Liebler:
>>
>>> The flag PTHREAD_MUTEX_NO_ELISION_NP is not explicitly checked before
>>> FORCE_ELISION is called. But only one of those two flags can be set.
>>> Your remaining assumption is correct.
>>> I've changed the comment in the three force-elision.h files. Is this
>>> okay?
>>
>> The comment looks good to me know.  Thanks!
>>
>> Florian
>>
> Committed, bugzilla closed and target milestone is set to 2.29.
> 
> Thanks,
> Stefan
> 

Starting with glibc 2.27, the configure switch --enable-lock-elision was 
removed with commit "Add elision tunables" 
(https://sourceware.org/git/?p=glibc.git;a=commit;h=07ed18d26a342741cb25a4739158c65ed9dd4d09).
Now you can use lock-elision by just setting the tunables environment 
variable.

Therefore I've cherry picked this patch to release branch 2.27 / 2.28.

Bye
Stefan



More information about the Libc-alpha mailing list