From f21e8f8ca466320fed38bdb71526c574dae98026 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 8 Nov 2018 14:28:22 +0100 Subject: 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). --- nptl/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nptl/Makefile') diff --git a/nptl/Makefile b/nptl/Makefile index 34ae830276..b01f2b0626 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -318,7 +318,8 @@ tests = tst-attr1 tst-attr2 tst-attr3 tst-default-attr \ tst-minstack-throw \ tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \ - tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock + tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock \ + tst-rwlock-pwn tests-internal := tst-rwlock19 tst-rwlock20 \ tst-sem11 tst-sem12 tst-sem13 \ -- cgit 1.4.1