[PATCH] nptl: Add EOVERFLOW checks for futex calls

Adhemerval Zanella adhemerval.zanella@linaro.org
Fri Nov 27 11:03:39 GMT 2020



On 27/11/2020 06:52, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
> 
>> Some futex-internal calls require additional check for EOVERFLOW (as
>> indicated by [1] [2]).  For both mutex and rwlock code, EOVERFLOW is
>> handle as ETIMEDOUT; since it indicate to the caller that the blocking
>> operation could not be performed.
>>
>> For mutex it avoids a possible issue where PTHREAD_MUTEX_ROBUST_* might
>> assume EOVERFLOW indicate futex has succeed, and for PTHREAD_MUTEX_PP_*
>> it avoid a potential busy infinite loop.  For rwlock, is also avoid
>> potential busy infinite loops.
> 
> What about the semaphore case (in __new_sem_wait_slow64)?

Indeed I forgot to analyze the cases of __futex_abstimed_wait_cancelable64,
there is some usage as well that requires adjustments. I will update the
patch.


More information about the Libc-alpha mailing list