summaryrefslogtreecommitdiffstats
path: root/LICENSE.PREVIEW.COMMERCIAL
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2017-02-16 10:27:35 +0100
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2017-02-17 16:21:20 +0000
commit8d6d68d3d363bb6aa1faec2355b32e3ea290116c (patch)
treed9953161ade88bd394cf7a370d0c267b4d740f0b /LICENSE.PREVIEW.COMMERCIAL
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 <marc.mutz@kdab.com>
Diffstat (limited to 'LICENSE.PREVIEW.COMMERCIAL')
0 files changed, 0 insertions, 0 deletions