diff options
author | Lucas A. M. Magalhaes <lamm@linux.ibm.com> | 2020-12-01 18:05:07 -0300 |
---|---|---|
committer | Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com> | 2020-12-01 18:26:26 -0300 |
commit | 61855081017dff30c577855cda882740356b5d98 (patch) | |
tree | 69472c92f3f8b65c240b5987bbeee2760108933b /nptl/Makefile | |
parent | 33fc34521de970153344cfe1bfa9ce6da7a6efea (diff) | |
download | glibc-61855081017dff30c577855cda882740356b5d98.tar glibc-61855081017dff30c577855cda882740356b5d98.tar.gz glibc-61855081017dff30c577855cda882740356b5d98.tar.bz2 glibc-61855081017dff30c577855cda882740356b5d98.zip |
nptl: Fix __futex_clocklock64 return error check [BZ #26964]
The earlier implementation of this, __lll_clocklock, calls lll_clockwait
that doesn't return the futex syscall error codes. It always tries again
if that fails.
However in the current implementation, when the futex returns EAGAIN,
__futex_clocklock64 will also return EGAIN, even if the futex is taken.
This patch fixes the EAGAIN issue and also adds a check for EINTR. As
futex syscall can return EINTR if the thread is interrupted by a signal.
In this case I'm assuming the function should continue trying to lock as
there is no mention to about it on POSIX. Also add a test for both
scenarios.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/Makefile')
-rw-r--r-- | nptl/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 94d805f0d4..ddd83dfbdd 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -298,7 +298,7 @@ tests = tst-attr2 tst-attr3 tst-default-attr \ tst-thread-affinity-sched \ tst-pthread-defaultattr-free \ tst-pthread-attr-sigmask \ - + tst-pthread-timedlock-lockloop tests-container = tst-pthread-getattr |