From: Florian Weimer <fweimer@redhat.com>
To: libc-stable@sourceware.org
Subject: [PATCH COMMITTED 2.33] nptl: Remove private futex optimization [BZ #27304]
Date: Tue, 16 Mar 2021 11:12:28 +0100 [thread overview]
Message-ID: <87y2enpfub.fsf@oldenburg.str.redhat.com> (raw)
It is effectively used, unexcept for pthread_cond_destroy, where we do
not want it; see bug 27304. The internal locks do not support a
process-shared mode.
This fixes commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl:
Move pthread_cond_destroy implementation into libc").
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit c4ad832276f4dadfa40904109b26a521468f66bc)
---
NEWS | 1 +
sysdeps/nptl/lowlevellock-futex.h | 14 +-------------
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/NEWS b/NEWS
index 94466f43a5..62612237f8 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ The following bugs are resolved with this release:
[18435] pthread_once hangs when init routine throws an exception
[23462] Static binary with dynamic string tokens ($LIB, $PLATFORM, $ORIGIN)
crashes
+ [27304] pthread_cond_destroy does not pass private flag to futex system calls
[27577] elf/ld.so --help doesn't work
\f
Version 2.33
diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h
index ecb729da6b..ca96397a4a 100644
--- a/sysdeps/nptl/lowlevellock-futex.h
+++ b/sysdeps/nptl/lowlevellock-futex.h
@@ -50,20 +50,8 @@
#define LLL_SHARED FUTEX_PRIVATE_FLAG
#ifndef __ASSEMBLER__
-
-# if IS_IN (libc) || IS_IN (rtld)
-/* In libc.so or ld.so all futexes are private. */
-# define __lll_private_flag(fl, private) \
- ({ \
- /* Prevent warnings in callers of this macro. */ \
- int __lll_private_flag_priv __attribute__ ((unused)); \
- __lll_private_flag_priv = (private); \
- ((fl) | FUTEX_PRIVATE_FLAG); \
- })
-# else
-# define __lll_private_flag(fl, private) \
+# define __lll_private_flag(fl, private) \
(((fl) | FUTEX_PRIVATE_FLAG) ^ (private))
-# endif
# define lll_futex_syscall(nargs, futexp, op, ...) \
({ \
reply other threads:[~2021-03-16 10:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2enpfub.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-stable@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).