]> git.ipfire.org Git - thirdparty/glibc.git/commit - nptl/Makefile
Take lock in pthread_cond_wait cleanup handler only when needed
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Wed, 10 Oct 2012 06:47:27 +0000 (12:17 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Wed, 10 Oct 2012 07:22:56 +0000 (12:52 +0530)
commit0e3b5d6a6859d74a18033d3a55e0ee92340437b3
treeb4f8c7fe139fb80e4fba77409942b68942a5df48
parentf96f12423a1b801f4a198f2568e29e85bd9cc473
Take lock in pthread_cond_wait cleanup handler only when needed

[BZ #14652]
When a thread waiting in pthread_cond_wait with a PI mutex is
cancelled after it has returned successfully from the futex syscall
but just before async cancellation is disabled, it enters its
cancellation handler with the mutex held and simply calling a
mutex_lock again will result in a deadlock.  Hence, it is necessary to
see if the thread owns the lock and try to lock it only if it doesn't.
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/pthread-pi-defines.sym
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
nptl/tst-cond25.c [new file with mode: 0644]