From: Emilio Cota Date: Tue, 24 Jan 2023 18:01:19 +0000 (+0000) Subject: util/qht: add missing atomic_set(hashes[i]) X-Git-Tag: v8.0.0-rc0~80^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=def48dddcfb2b8d9ef64ba5e6845ace006d30d27;p=thirdparty%2Fqemu.git util/qht: add missing atomic_set(hashes[i]) We forgot to add this one in "a890643958 util/qht: atomically set b->hashes". Detected with tsan. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Signed-off-by: Emilio Cota Message-Id: <20230111151628.320011-3-cota@braap.org> Signed-off-by: Alex Bennée Message-Id: <20230124180127.1881110-28-alex.bennee@linaro.org> --- diff --git a/util/qht.c b/util/qht.c index 065fc501f44..15866299e69 100644 --- a/util/qht.c +++ b/util/qht.c @@ -688,7 +688,7 @@ static inline void qht_bucket_remove_entry(struct qht_bucket *orig, int pos) int i; if (qht_entry_is_last(orig, pos)) { - orig->hashes[pos] = 0; + qatomic_set(&orig->hashes[pos], 0); qatomic_set(&orig->pointers[pos], NULL); return; }