]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
chg: dev: Use release memory ordering when incrementing reference counter
authorOndřej Surý <ondrej@isc.org>
Mon, 30 Sep 2024 12:22:05 +0000 (12:22 +0000)
committerOndřej Surý <ondrej@isc.org>
Mon, 30 Sep 2024 12:22:05 +0000 (12:22 +0000)
As the relaxed memory ordering doesn't ensure any memory
synchronization, it is possible that the increment will succeed even
in the case when it should not - there is a race between
atomic_fetch_sub(..., acq_rel) and atomic_fetch_add(..., relaxed).
Only the result is consistent, but the previous value for both calls
could be same when both calls are executed at the same time.

Merge branch 'ondrej/use-release-memory-ordering-for-reference-counting' into 'main'

See merge request isc-projects/bind9!9460


Trivial merge