This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/12674] sem_post/sem_wait race causing sem_post to return EINVAL
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 21 Jan 2015 05:57:03 +0000
- Subject: [Bug nptl/12674] sem_post/sem_wait race causing sem_post to return EINVAL
- Auto-submitted: auto-generated
- References: <bug-12674-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=12674
--- Comment #21 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
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, master has been updated
via 042e1521c794a945edc43b5bfa7e69ad70420524 (commit)
from a8db092ec0c6742a9d41e1715946e90d4edfeec1 (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 -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=042e1521c794a945edc43b5bfa7e69ad70420524
commit 042e1521c794a945edc43b5bfa7e69ad70420524
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Wed Jan 21 00:46:16 2015 -0500
Fix semaphore destruction (bug 12674).
This commit fixes semaphore destruction by either using 64b atomic
operations (where available), or by using two separate fields when only
32b atomic operations are available. In the latter case, we keep a
conservative estimate of whether there are any waiting threads in one
bit of the field that counts the number of available tokens, thus
allowing sem_post to atomically both add a token and determine whether
it needs to call futex_wake.
See:
https://sourceware.org/ml/libc-alpha/2014-12/msg00155.html
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 52 +++
NEWS | 25 +-
nptl/DESIGN-sem.txt | 46 --
nptl/Makefile | 5 +-
nptl/sem_getvalue.c | 26 +-
nptl/sem_init.c | 35 +-
nptl/sem_open.c | 9 +-
nptl/sem_post.c | 67 +++-
nptl/sem_timedwait.c | 96 +----
nptl/sem_trywait.c | 50 ---
nptl/sem_wait.c | 101 ++---
nptl/sem_waitcommon.c | 467 +++++++++++++++++++++
nptl/structsem.sym | 12 -
nptl/tst-sem11.c | 9 +-
nptl/tst-sem13.c | 18 +-
sysdeps/nptl/internaltypes.h | 24 +-
sysdeps/unix/sysv/linux/alpha/sem_post.c | 5 -
sysdeps/unix/sysv/linux/i386/i486/sem_post.S | 150 -------
sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S | 327 --------------
sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S | 67 ---
sysdeps/unix/sysv/linux/i386/i486/sem_wait.S | 343 ---------------
sysdeps/unix/sysv/linux/i386/i586/sem_post.S | 19 -
sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S | 19 -
sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S | 19 -
sysdeps/unix/sysv/linux/i386/i586/sem_wait.S | 19 -
sysdeps/unix/sysv/linux/i386/i686/sem_post.S | 19 -
sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S | 19 -
sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S | 19 -
sysdeps/unix/sysv/linux/i386/i686/sem_wait.S | 19 -
sysdeps/unix/sysv/linux/powerpc/sem_post.c | 71 ----
sysdeps/unix/sysv/linux/x86_64/sem_post.S | 75 ----
sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S | 380 -----------------
sysdeps/unix/sysv/linux/x86_64/sem_trywait.S | 47 --
sysdeps/unix/sysv/linux/x86_64/sem_wait.S | 176 --------
34 files changed, 732 insertions(+), 2103 deletions(-)
delete mode 100644 nptl/DESIGN-sem.txt
delete mode 100644 nptl/sem_trywait.c
create mode 100644 nptl/sem_waitcommon.c
delete mode 100644 nptl/structsem.sym
delete mode 100644 sysdeps/unix/sysv/linux/alpha/sem_post.c
delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/sem_post.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/sem_wait.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/sem_post.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/sem_wait.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/sem_post.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S
delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/sem_wait.S
delete mode 100644 sysdeps/unix/sysv/linux/powerpc/sem_post.c
delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sem_post.S
delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sem_trywait.S
delete mode 100644 sysdeps/unix/sysv/linux/x86_64/sem_wait.S
--
You are receiving this mail because:
You are on the CC list for the bug.