rwlock: Fix explicit hand-over (bug 21298)
commitfaf8c066df0d6bccb54bd74dd696eeb65e1b3bbc
authorCarlos O'Donell <carlos@systemhalted.org>
Fri, 28 Jul 2017 04:22:44 +0000 (28 00:22 -0400)
committerCarlos O'Donell <carlos@systemhalted.org>
Fri, 28 Jul 2017 04:23:58 +0000 (28 00:23 -0400)
treeaf22c223947b73a7c22f3add45da6b5c8f204672
parent2557ae38f3aa599718f34317cd0c150892a92be5
rwlock: Fix explicit hand-over (bug 21298)

Without this fix, the rwlock can fail to execute the explicit hand-over
in certain cases (e.g., empty critical sections that switch quickly between
read and write phases).  This can then lead to errors in how __wrphase_futex
is accessed, which in turn can lead to deadlocks.
12 files changed:
ChangeLog
nptl/Makefile
nptl/pthread_rwlock_common.c
nptl/tst-rwlock20.c [new file with mode: 0644]
support/Makefile
support/xpthread_rwlock_init.c [new file with mode: 0644]
support/xpthread_rwlock_rdlock.c [new file with mode: 0644]
support/xpthread_rwlock_unlock.c [new file with mode: 0644]
support/xpthread_rwlock_wrlock.c [new file with mode: 0644]
support/xpthread_rwlockattr_init.c [new file with mode: 0644]
support/xpthread_rwlockattr_setkind_np.c [new file with mode: 0644]
support/xthread.h