about summary refs log tree commit diff
path: root/nptl/ChangeLog
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2012-10-10 12:17:27 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2012-10-10 12:52:56 +0530
commit0e3b5d6a6859d74a18033d3a55e0ee92340437b3 (patch)
treeb4f8c7fe139fb80e4fba77409942b68942a5df48 /nptl/ChangeLog
parentf96f12423a1b801f4a198f2568e29e85bd9cc473 (diff)
downloadglibc-0e3b5d6a6859d74a18033d3a55e0ee92340437b3.tar.gz
glibc-0e3b5d6a6859d74a18033d3a55e0ee92340437b3.tar.xz
glibc-0e3b5d6a6859d74a18033d3a55e0ee92340437b3.zip
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.
Diffstat (limited to 'nptl/ChangeLog')
-rw-r--r--nptl/ChangeLog18
1 files changed, 18 insertions, 0 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 9eeeeb1bde..01ad0b97d6 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,21 @@
+2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	[BZ #14652]
+	* Makefile (tests): New test case tst-cond25.
+	(LDFLAGS-tst-cond25): Link tst-cond25 against librt.
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+	(__condvar_tw_cleanup): Lock mutex only if we don't already
+	own it.
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+	(__condvar_w_cleanup): Likewise.
+	* sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+	(__condvar_cleanup2): Lock mutex only if we don't already
+	own it.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+	(__condvar_cleanup1): Likewise.
+	* tst-cond25.c: New test case.
+
 2012-10-09  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/pthread/configure: Regenerated.