qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, qemu-stable@nongnu.org
Subject: Re: [PATCH] async: access bottom half flags with qatomic_read
Date: Mon, 13 Oct 2025 21:07:02 +0200	[thread overview]
Message-ID: <89f61779-e078-4778-a8ef-d5a507c46f28@linaro.org> (raw)
In-Reply-To: <20251013162620.995747-1-pbonzini@redhat.com>

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: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   util/async.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



      reply	other threads:[~2025-10-13 19:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13 16:26 [PATCH] async: access bottom half flags with qatomic_read Paolo Bonzini
2025-10-13 19:07 ` Philippe Mathieu-Daudé [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89f61779-e078-4778-a8ef-d5a507c46f28@linaro.org \
    --to=philmd@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).