On 13/10/25 18:26, Paolo Bonzini wrote:
Running test-aio-multithread under TSAN reveals data races on bh->flags.
Because bottom halves may be scheduled or canceled asynchronously,
without taking a lock, adjust aio_compute_bh_timeout() and aio_ctx_check()
to use a relaxed read to access the flags.
Use an acquire load to ensure that anything that was written prior to
qemu_bh_schedule() is visible.
Resolves: #2749
Resolves: #851
Preferably using the full URL:
https://gitlab.com/qemu-project/qemu/-/issues/851
https://gitlab.com/qemu-project/qemu/-/issues/2749
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
---
util/async.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>