This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.16-ports-merge-478-g9485a40


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  9485a404440e392dbcfdc157bbdf5c863f9c0fce (commit)
      from  172a631a1fc8ec8fcef80af1f91438d092957c3e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9485a404440e392dbcfdc157bbdf5c863f9c0fce

commit 9485a404440e392dbcfdc157bbdf5c863f9c0fce
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Tue Oct 16 14:23:01 2012 +0530

    Adjust mutex lock in condvar_cleanup if we got it from requeue_pi
    
    This completes the fix to bz #14652.

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 43c5b45..4553250 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,16 @@
+2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	[BZ #14652]
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+	(__condvar_tw_cleanup):  Adjust the mutex data structure if it
+	was locked by FUTEX_WAIT_REQUEUE_PI.
+	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
+	(__condvar_w_cleanup): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+	(__condvar_cleanup2): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+	(__condvar_cleanup1): Likewise.
+
 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
 
 	* sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index 884987c..6011f69 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
@@ -662,7 +662,10 @@ __condvar_tw_cleanup:
 	movl	(%eax), %ebx
 	andl	$TID_MASK, %ebx
 	cmpl	%ebx, %gs:TID
-	je	9f
+	jne	8f
+	/* We managed to get the lock.  Fix it up before returning.  */
+	call	__pthread_mutex_cond_lock_adjust
+	jmp	9f
 
 8:	call	__pthread_mutex_cond_lock
 
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
index bf1e5fe..b418be3 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
@@ -579,7 +579,10 @@ __condvar_w_cleanup:
 	movl	(%eax), %ebx
 	andl	$TID_MASK, %ebx
 	cmpl	%ebx, %gs:TID
-	je	9f
+	jne	8f
+	/* We managed to get the lock.  Fix it up before returning.  */
+	call	__pthread_mutex_cond_lock_adjust
+	jmp	9f
 
 8:	call	__pthread_mutex_cond_lock
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index eb13326..15e451a 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -784,7 +784,10 @@ __condvar_cleanup2:
 	movl	(%rdi), %eax
 	andl	$TID_MASK, %eax
 	cmpl	%eax, %fs:TID
-	je	8f
+	jne	7f
+	/* We managed to get the lock.  Fix it up before returning.  */
+	callq	__pthread_mutex_cond_lock_adjust
+	jmp	8f
 
 7:	callq	__pthread_mutex_cond_lock
 
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
index 6c6dc0e..2c6b515 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
@@ -508,7 +508,11 @@ __condvar_cleanup1:
 	movl	(%rdi), %eax
 	andl	$TID_MASK, %eax
 	cmpl	%eax, %fs:TID
-	je	8f
+	jne	7f
+	/* We managed to get the lock.  Fix it up before returning.  */
+	callq	__pthread_mutex_cond_lock_adjust
+	jmp	8f
+
 
 7:	callq	__pthread_mutex_cond_lock
 

-----------------------------------------------------------------------

Summary of changes:
 nptl/ChangeLog                                     |   13 +++++++++++++
 .../sysv/linux/i386/i486/pthread_cond_timedwait.S  |    5 ++++-
 .../unix/sysv/linux/i386/i486/pthread_cond_wait.S  |    5 ++++-
 .../sysv/linux/x86_64/pthread_cond_timedwait.S     |    5 ++++-
 .../unix/sysv/linux/x86_64/pthread_cond_wait.S     |    6 +++++-
 5 files changed, 30 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]