Re: [PATCH] Fix data race with the state Field of ThreadPoolElement

2025-02-26 Thread mordan
Hello! Please take a look at the new version of the patch here: https://lore.kernel.org/all/20250224161719.3831357-1-mor...@ispras.ru Thank you! February 20, 2025 6:10 AM, "Paolo Bonzini" wrote: > On 2/19/25 17:12, Vitalii Mordan wrote: > >> diff --git a/util/thread-pool.c b/util/thread-pool.c

Re: [PATCH] Fix data race with the state Field of ThreadPoolElement

2025-02-20 Thread Paolo Bonzini
On 2/19/25 17:12, Vitalii Mordan wrote: diff --git a/util/thread-pool.c b/util/thread-pool.c index 27eb777e85..6c5f4d085b 100644 --- a/util/thread-pool.c +++ b/util/thread-pool.c @@ -111,9 +111,8 @@ static void *worker_thread(void *opaque) ret = req->func(req->arg); req->re

Re: [PATCH] Fix data race with the state Field of ThreadPoolElement

2025-02-19 Thread Stefan Hajnoczi
On Wed, Feb 19, 2025 at 07:12:23PM +0300, Vitalii Mordan wrote: > TSAN reports a potential data race on the state field of > ThreadPoolElement. This is fixed by using atomic access to the field. The tsan output from the bug report: WARNING: ThreadSanitizer: data race (pid=787043) Write of size

[PATCH] Fix data race with the state Field of ThreadPoolElement

2025-02-19 Thread Vitalii Mordan
TSAN reports a potential data race on the state field of ThreadPoolElement. This is fixed by using atomic access to the field. Fixes: d354c7eccf ("aio: add generic thread-pool facility") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2822 Signed-off-by: Vitalii Mordan --- util/thread-po