This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch release/2.25/master updated. glibc-2.25-128-g1324858
- From: fw at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 Aug 2018 17:23:37 -0000
- Subject: GNU C Library master sources branch release/2.25/master updated. glibc-2.25-128-g1324858
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, release/2.25/master has been updated
via 1324858a3fd3d0291f9dec45f771881ba7209150 (commit)
from 71616d59ec97fe798b69f749e7fb424bd6d2432b (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1324858a3fd3d0291f9dec45f771881ba7209150
commit 1324858a3fd3d0291f9dec45f771881ba7209150
Author: Martin Kuchta <martin.kuchta@netapp.com>
Date: Mon Aug 27 18:54:46 2018 +0200
pthread_cond_broadcast: Fix waiters-after-spinning case [BZ #23538]
(cherry picked from commit 99ea93ca31795469d2a1f1570f17a5c39c2eb7e2)
diff --git a/ChangeLog b/ChangeLog
index 6b5cfba..7349a33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-08-27 Martin Kuchta <martin.kuchta@netapp.com>
+ Torvald Riegel <triegel@redhat.com>
+
+ [BZ #23538]
+ * nptl/pthread_cond_common.c (__condvar_quiesce_and_switch_g1):
+ Update r to include the set wake-request flag if waiters are
+ remaining after spinning.
+
2018-01-19 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
[BZ #22685]
diff --git a/NEWS b/NEWS
index dafec5d..abe90d1 100644
--- a/NEWS
+++ b/NEWS
@@ -84,6 +84,7 @@ The following bugs are resolved with this release:
[22685] powerpc: Fix syscalls during early process initialization
[22715] x86-64: Properly align La_x86_64_retval to VEC_SIZE
[22774] malloc: Integer overflow in malloc (CVE-2018-6551)
+ [23538] pthread_cond_broadcast: Fix waiters-after-spinning case
Version 2.25
diff --git a/nptl/pthread_cond_common.c b/nptl/pthread_cond_common.c
index 7c63ef9..886f0ab 100644
--- a/nptl/pthread_cond_common.c
+++ b/nptl/pthread_cond_common.c
@@ -406,8 +406,12 @@ __condvar_quiesce_and_switch_g1 (pthread_cond_t *cond, uint64_t wseq,
{
/* There is still a waiter after spinning. Set the wake-request
flag and block. Relaxed MO is fine because this is just about
- this futex word. */
- r = atomic_fetch_or_relaxed (cond->__data.__g_refs + g1, 1);
+ this futex word.
+
+ Update r to include the set wake-request flag so that the upcoming
+ futex_wait only blocks if the flag is still set (otherwise, we'd
+ violate the basic client-side futex protocol). */
+ r = atomic_fetch_or_relaxed (cond->__data.__g_refs + g1, 1) | 1;
if ((r >> 1) > 0)
futex_wait_simple (cond->__data.__g_refs + g1, r, private);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
NEWS | 1 +
nptl/pthread_cond_common.c | 8 ++++++--
3 files changed, 15 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU C Library master sources