diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-10-05 18:52:35 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-10-05 18:52:36 +0530 |
commit | c30e8edf7c56e55a81173da39f3e721ab17b9db6 (patch) | |
tree | cff2d492fe0d34bf49af97371eb4260cb193ae3d /nptl/ChangeLog | |
parent | c2b598a94512c5d754b25c77399032e87c1f2dd5 (diff) | |
download | glibc-c30e8edf7c56e55a81173da39f3e721ab17b9db6.tar.gz glibc-c30e8edf7c56e55a81173da39f3e721ab17b9db6.tar.xz glibc-c30e8edf7c56e55a81173da39f3e721ab17b9db6.zip |
Unlock mutex before going back to waiting for PI mutexes
[BZ #14417] A futex call with FUTEX_WAIT_REQUEUE_PI returns with the mutex locked on success. If such a successful thread is pipped to the cond_lock by another spuriously woken waiter, it could be sent back to wait on the futex with the mutex lock held, thus causing a deadlock. So it is necessary that the thread relinquishes the mutex before going back to sleep.
Diffstat (limited to 'nptl/ChangeLog')
-rw-r--r-- | nptl/ChangeLog | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 586e282cc6..23b77531ce 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,22 @@ +2012-10-05 Siddhesh Poyarekar <siddhesh@redhat.com> + + [BZ #14417] + * Makefile (tests): New test case tst-cond24. + (LDFLAGS-tst-cond24): Link tst-cond24 against librt. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S + (__pthread_cond_timedwait): Unlock mutex before going back to + wait in PI case. + * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S + (__pthread_cond_wait): Likewise. Revert handling of EAGAIN + return from futex_wait. + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S + (__pthread_cond_timedwait): Unlock mutex before going back to + wait in PI case. Set requeue_pi flag only if wait returned 0. + * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S + (__pthread_cond_wait): Likewise. Revert handling of EAGAIN + return from futex_wait. + * tst-cond24.c: New test case. + 2012-10-04 Roland McGrath <roland@hack.frob.com> * pthread_create.c (start_thread): Use __madvise, not madvise. |