path: root/src/corelib/mimetypes
diff options
authorOlivier Goffart <>2017-02-16 10:27:35 +0100
committerOlivier Goffart (Woboq GmbH) <>2017-02-17 16:21:20 +0000
commit8d6d68d3d363bb6aa1faec2355b32e3ea290116c (patch)
treed9953161ade88bd394cf7a370d0c267b4d740f0b /src/corelib/mimetypes
parent6f64bfa654fb7e20bb75ec3b0544b81482babb44 (diff)
QReadWriteLocker: Fix race in unlock
An Acquire barrier in QReadWriteLocker::unlock was missing to synchronize with the testAndSetOrdered on d_ptr in the lock functions. The race is between the write of d->writerCount in tryLockForWrite, and the read in unlock. The acquire on d->mutex is not enough because it is not on the same object. While that race could be fixed by taking the newly-allocate()ed d's mutex before publishing it with testAndSet, there's another race, on 'recursive', between a newly-minted Private* with recursive == false in tryLockForWrite(), and the read of 'recursive' in unlock(). Task-number: QTBUG-58917 Change-Id: I10ba36573c0e57468d11e9b77d85045711feaea1 Reviewed-by: Marc Mutz <>
Diffstat (limited to 'src/corelib/mimetypes')
0 files changed, 0 insertions, 0 deletions