diff options
author | Torvald Riegel <triegel@redhat.com> | 2016-12-15 16:06:28 +0100 |
---|---|---|
committer | Torvald Riegel <triegel@redhat.com> | 2016-12-19 20:12:15 +0100 |
commit | 353683a22ed8a493a6bd1d78d63e144bc3e85d2f (patch) | |
tree | 47077624487b75c819607c8ac2aa2c61654619d0 /ChangeLog | |
parent | da16c9b524908fe0353efc4af8eab6a5ad5ea50b (diff) | |
download | glibc-353683a22ed8a493a6bd1d78d63e144bc3e85d2f.tar.gz glibc-353683a22ed8a493a6bd1d78d63e144bc3e85d2f.tar.xz glibc-353683a22ed8a493a6bd1d78d63e144bc3e85d2f.zip |
Robust mutexes: Fix lost wake-up.
Assume that Thread 1 waits to acquire a robust mutex using futexes to block (and thus sets the FUTEX_WAITERS flag), and is unblocked when this mutex is released. If Thread 2 concurrently acquires the lock and is killed, Thread 1 can recover from the died owner but fail to restore the FUTEX_WAITERS flag. This can lead to a Thread 3 that also blocked using futexes at the same time as Thread 1 to not get woken up because FUTEX_WAITERS is not set anymore. The fix for this is to ensure that we continue to preserve the FUTEX_WAITERS flag whenever we may have set it or shared it with another thread. This is the same requirement as in the algorithm for normal mutexes, only that the robust mutexes need additional handling for died owners and thus preserving the FUTEX_WAITERS flag cannot be done just in the futex slowpath code. [BZ #20973] * nptl/pthread_mutex_lock.c (__pthread_mutex_lock_full): Fix lost wake-up in robust mutexes. * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index c2bb608c0b..e7c9757c4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2016-12-19 Torvald Riegel <triegel@redhat.com> + + [BZ #20973] + * nptl/pthread_mutex_lock.c (__pthread_mutex_lock_full): Fix lost + wake-up in robust mutexes. + * nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise. + 2016-12-19 Adhemerval Zanella <adhemerval.zanella@linaro.org> * benchtests/Makefile (bench-math): Add fminf and fmaxf. |