qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] util/interval-tree: Avoid race conditions without optimizati


From: Peter Maydell
Subject: Re: [PATCH] util/interval-tree: Avoid race conditions without optimization
Date: Thu, 13 Jul 2023 12:32:11 +0100

On Fri, 7 Jul 2023 at 11:30, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Read the left and right trees once, so that the gating
> tests are meaningful.  This was only a problem at -O0,
> where the compiler didn't CSE the two reads.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

If this data structure is intended to support operations
being done on it while it's being mutated, shouldn't it
be using the atomic accessors, though? That would make
it clearer that you can't just undo the transformation
made by this patch.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]