diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-10-16 14:23:01 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2012-10-16 14:23:35 +0530 |
commit | 9485a404440e392dbcfdc157bbdf5c863f9c0fce (patch) | |
tree | 6e03a935c732c07e5d7ada90bf8dbc49df0dbf74 /nptl/sysdeps/unix/sysv/linux/i386 | |
parent | 172a631a1fc8ec8fcef80af1f91438d092957c3e (diff) | |
download | glibc-9485a404440e392dbcfdc157bbdf5c863f9c0fce.tar.gz glibc-9485a404440e392dbcfdc157bbdf5c863f9c0fce.tar.xz glibc-9485a404440e392dbcfdc157bbdf5c863f9c0fce.zip |
Adjust mutex lock in condvar_cleanup if we got it from requeue_pi
This completes the fix to bz #14652.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S | 5 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S | 5 |
2 files changed, 8 insertions, 2 deletions
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 884987cf50..6011f69f12 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 bf1e5fe788..b418be3c41 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 |