Files
Paolo Bonzini 5adcdce946 async: access bottom half flags with qatomic_read
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.

Closes: https://gitlab.com/qemu-project/qemu/-/issues/2749
Closes: https://gitlab.com/qemu-project/qemu/-/issues/851
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 5142397c79)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-10-15 07:35:42 +03:00
..
2020-01-06 18:41:32 +04:00
2022-04-21 17:03:51 +04:00
2020-12-10 17:16:44 +01:00
2022-06-29 10:56:12 +03:00
2022-03-04 18:14:40 +01:00
2021-04-01 15:27:44 +04:00