]> git.ipfire.org Git - thirdparty/glibc.git/commit - ChangeLog
Fix rwlock stall with PREFER_WRITER_NONRECURSIVE_NP (bug 23861)
authorAndreas Schwab <schwab@suse.de>
Thu, 8 Nov 2018 13:28:22 +0000 (14:28 +0100)
committerCarlos O'Donell <carlos@redhat.com>
Thu, 13 Dec 2018 16:58:04 +0000 (11:58 -0500)
commit4d7af7815af5217db6e8fde6032ddf4f6b2a4420
tree05dce49e9614a510ea5ddeb9d8e167f8d7f925f1
parent852620258deea8afda5674f397113fa87ce1007c
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)
ChangeLog
nptl/Makefile
nptl/pthread_rwlock_common.c
nptl/tst-rwlock-pwn.c [new file with mode: 0644]