Unlock mutex before going back to waiting for PI mutexes
commitc30e8edf7c56e55a81173da39f3e721ab17b9db6
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 5 Oct 2012 13:22:35 +0000 (5 18:52 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 5 Oct 2012 13:22:36 +0000 (5 18:52 +0530)
treecff2d492fe0d34bf49af97371eb4260cb193ae3d
parentc2b598a94512c5d754b25c77399032e87c1f2dd5
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.
NEWS
nptl/ChangeLog
nptl/Makefile
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
nptl/tst-cond24.c [new file with mode: 0644]