forked from pool/glibc
Andreas Schwab
9a39949079
- unwind-ctor.patch: Add missing unwind information to ld.so on powerpc32 (BZ #23707) - old-getdents64.patch: Rewrite __old_getdents64 (BZ #23497) - nss-files-leak.patch: Fix file stream leak in aliases lookup (BZ #23521) - riscv-feholdexcept-setround.patch: Fix rounding save/restore bug - pthread-cond-broadcast-waiters-after-spinning.patch: Fix waiters-after-spinning case (BZ #23538) - regex-uninit-memory-access.patch: fix uninitialized memory access (BZ #23578) - spawni-maybe-script-execute.patch: Fix segfault in maybe_script_execute - gethostid-gethostbyname-failure.patch: Check for NULL value from gethostbyname_r (BZ #23679) - strstr-huge-needle.patch: Fix strstr bug with huge needles (BZ #23637) OBS-URL: https://build.opensuse.org/request/show/638790 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=511
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
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.
|
|
|
|
Index: glibc-2.28/nptl/pthread_cond_common.c
|
|
===================================================================
|
|
--- glibc-2.28.orig/nptl/pthread_cond_common.c
|
|
+++ glibc-2.28/nptl/pthread_cond_common.c
|
|
@@ -405,8 +405,12 @@ __condvar_quiesce_and_switch_g1 (pthread
|
|
{
|
|
/* 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);
|