This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/21778] Robust mutex may deadlock


https://sourceware.org/bugzilla/show_bug.cgi?id=21778

--- Comment #8 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  5920a4a624b1f4db310d1c44997b640e2a4653e5 (commit)
      from  d95fcb2df478efbf4f8537ba898374043ac4561f (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=5920a4a624b1f4db310d1c44997b640e2a4653e5

commit 5920a4a624b1f4db310d1c44997b640e2a4653e5
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Sat Jul 29 00:02:03 2017 -0400

    mutex: Fix robust mutex lock acquire (Bug 21778)

    65810f0ef05e8c9e333f17a44e77808b163ca298 fixed a robust mutex bug but
    introduced BZ 21778: if the CAS used to try to acquire a lock fails, the
    expected value is not updated, which breaks other cases in the loce
    acquisition loop.  The fix is to simply update the expected value with
    the value returned by the CAS, which ensures that behavior is as if the
    first case with the CAS never happened (if the CAS fails).

    This is a regression introduced in the last release.

    Tested on x86_64, i686, ppc64, ppc64le, s390x, aarch64, armv7hl.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |   15 ++++++++++++-
 nptl/Makefile                  |    2 +-
 nptl/pthread_mutex_lock.c      |   13 +++++++----
 nptl/pthread_mutex_timedlock.c |   13 +++++++----
 nptl/tst-mutex7.c              |   45 +++++++++++++++++++++++++++++++--------
 nptl/tst-mutex7robust.c        |    7 ++++++
 6 files changed, 73 insertions(+), 22 deletions(-)
 create mode 100644 nptl/tst-mutex7robust.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]