[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 19/26] util/qht: add missing atomic_set(hashes[i])
From: |
Alex Bennée |
Subject: |
[PATCH 19/26] util/qht: add missing atomic_set(hashes[i]) |
Date: |
Tue, 10 Jan 2023 17:39:15 +0000 |
From: Emilio Cota <cota@braap.org>
We forgot to add this one in "a890643958 util/qht: atomically set b->hashes".
Detected with tsan.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Emilio Cota <cota@braap.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230109224954.161672-3-cota@braap.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
util/qht.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/qht.c b/util/qht.c
index 065fc501f4..15866299e6 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;
}
--
2.34.1
- [PATCH 08/26] meson: replace Perl usage with Python, (continued)
- [PATCH 08/26] meson: replace Perl usage with Python, Alex Bennée, 2023/01/10
- [PATCH 07/26] configure: replace Perl usage with sed, Alex Bennée, 2023/01/10
- [PATCH 17/26] tests/tcg: add memory-sve test for aarch64, Alex Bennée, 2023/01/10
- [PATCH 15/26] docs: add a proper feature overview in "About QEMU", Alex Bennée, 2023/01/10
- [PATCH 11/26] lcitool: drop perl from QEMU project/dependencies, Alex Bennée, 2023/01/10
- [PATCH 20/26] thread: de-const qemu_spin_destroy, Alex Bennée, 2023/01/10
- [PATCH 09/26] docs: drop texinfo options, Alex Bennée, 2023/01/10
- [PATCH 19/26] util/qht: add missing atomic_set(hashes[i]),
Alex Bennée <=
- [PATCH 10/26] Update lcitool and fedora to 37, Alex Bennée, 2023/01/10
- [PATCH 13/26] semihosting: Write back semihosting data before completion callback, Alex Bennée, 2023/01/10
- [PATCH 18/26] cpu: free cpu->tb_jmp_cache with RCU, Alex Bennée, 2023/01/10
- [PATCH 14/26] semihosting: add O_BINARY flag in host_open for NT compatibility, Alex Bennée, 2023/01/10
- [PATCH 12/26] lcitool: drop texinfo from QEMU project/dependencies, Alex Bennée, 2023/01/10
- [PATCH 23/26] plugins: fix optimization in plugin_gen_disable_mem_helpers, Alex Bennée, 2023/01/10
- [PATCH 21/26] util/qht: use striped locks under TSAN, Alex Bennée, 2023/01/10
- [PATCH 16/26] semihosting: add semihosting section to the docs, Alex Bennée, 2023/01/10