Fix lost wakeups in pthread_cond_*. (#552960, #769421)

This commit is contained in:
Jeff Law 2012-02-10 12:56:02 -07:00
parent 48de2e8094
commit 0f6595ecf5
2 changed files with 30 additions and 3 deletions

27
glibc-rh552960-2.patch Normal file
View File

@ -0,0 +1,27 @@
diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:49:42.609737373 -0700
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:52:00.962150379 -0700
@@ -438,6 +438,10 @@ __pthread_cond_wait:
addl $1, cond_futex(%ebx)
movl cond_futex(%ebx), %ebp
+ /* Increment total_seq to ensure we do not lose wakeups. */
+ addl $1, total_seq(%ebx)
+ adcl $0, total_seq+4(%ebx)
+
/* Unlock. */
LOCK
#if cond_lock == 0
diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:49:42.612737361 -0700
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:52:36.179000963 -0700
@@ -366,6 +366,9 @@ __pthread_cond_wait:
incl cond_futex(%rdi)
movl cond_futex(%rdi), %edx
+ /* Increment total_seq to ensure we do not lose wakeups. */
+ incq total_seq(%rdi)
+
/* Release internal lock. */
LOCK
#if cond_lock == 0

View File

@ -51,9 +51,8 @@ Patch3: %{name}-rh757881.patch
Patch4: %{name}-rh740506.patch Patch4: %{name}-rh740506.patch
# Not sure of upstream status # Not sure of upstream status
Patch5: %{name}-rh730856.patch Patch5: %{name}-rh730856.patch
# Reverting an upstream patch. I don't think this has been discussed upstream yet. # Follow-on to 552960's original patch to avoid losing wakeups
# Caused a variety of problems for Fedora & Debian Patch6: %{name}-rh552960-2.patch
Patch6: %{name}-rh769421.patch
Patch7: %{name}-rh729661.patch Patch7: %{name}-rh729661.patch
Patch8: %{name}-rh446078.patch Patch8: %{name}-rh446078.patch
Patch9: %{name}-rh454629.patch Patch9: %{name}-rh454629.patch
@ -1185,6 +1184,7 @@ rm -f *.filelist*
%changelog %changelog
* Fri Feb 8 2012 Jeff Law <law@redhat.com> - 2.15-17 * Fri Feb 8 2012 Jeff Law <law@redhat.com> - 2.15-17
- Fix lost wakeups in pthread_cond_*. (#552960, #769421)
- Clarify info page for snprintf (#564528) - Clarify info page for snprintf (#564528)
- Fix first_weekday and first_workday for ru_UA (#624296) - Fix first_weekday and first_workday for ru_UA (#624296)