[Bug nptl/23861] rdlock stalls indefinitely on an unlocked pthread rwlock

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Thu Dec 13 17:30:00 GMT 2018


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

--- Comment #6 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, release/2.28/master has been updated
       via  4d7af7815af5217db6e8fde6032ddf4f6b2a4420 (commit)
      from  852620258deea8afda5674f397113fa87ce1007c (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=4d7af7815af5217db6e8fde6032ddf4f6b2a4420

commit 4d7af7815af5217db6e8fde6032ddf4f6b2a4420
Author: Andreas Schwab <schwab@suse.de>
Date:   Thu Nov 8 14:28:22 2018 +0100

    Fix rwlock stall with PREFER_WRITER_NONRECURSIVE_NP (bug 23861)

    In the read lock function (__pthread_rwlock_rdlock_full) there was a
    code path which would fail to reload __readers while waiting for
    PTHREAD_RWLOCK_RWAITING to change. This failure to reload __readers
    into a local value meant that various conditionals used the old value
    of __readers and with only two threads left it could result in an
    indefinite stall of one of the readers (waiting for PTHREAD_RWLOCK_RWAITING
    to go to zero, but it never would).

    (cherry picked from commit f21e8f8ca466320fed38bdb71526c574dae98026)

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

Summary of changes:
 ChangeLog                    |    9 ++++
 nptl/Makefile                |    3 +-
 nptl/pthread_rwlock_common.c |    4 +-
 nptl/tst-rwlock-pwn.c        |   87 ++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 100 insertions(+), 3 deletions(-)
 create mode 100644 nptl/tst-rwlock-pwn.c

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


More information about the Glibc-bugs mailing list