diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2020-12-30 19:19:37 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2021-05-11 17:16:37 +0100 |
commit | f4f8f4d4e0f92488431b268c8cd9555730b9afe9 (patch) | |
tree | 5bdda8e64325bdf0c3a69e3ddd483a0ce47fb614 /math/libm-test-hypot.inc | |
parent | 1387ad6225c2222f027790e3f460e31aa5dd2c54 (diff) | |
download | glibc-f4f8f4d4e0f92488431b268c8cd9555730b9afe9.tar.gz glibc-f4f8f4d4e0f92488431b268c8cd9555730b9afe9.tar.xz glibc-f4f8f4d4e0f92488431b268c8cd9555730b9afe9.zip |
elf: Use relaxed atomics for racy accesses [BZ #19329]
This is a follow up patch to the fix for bug 19329. This adds relaxed MO atomics to accesses that were previously data races but are now race conditions, and where relaxed MO is sufficient. The race conditions all follow the pattern that the write is behind the dlopen lock, but a read can happen concurrently (e.g. during tls access) without holding the lock. For slotinfo entries the read value only matters if it reads from a synchronized write in dlopen or dlclose, otherwise the related dtv entry is not valid to access so it is fine to leave it in an inconsistent state. The same applies for GL(dl_tls_max_dtv_idx) and GL(dl_tls_generation), but there the algorithm relies on the fact that the read of the last synchronized write is an increasing value. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'math/libm-test-hypot.inc')
0 files changed, 0 insertions, 0 deletions