All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] Fix race condition in throttle_group_restart_queue()
@ 2026-03-12 12:11 Alberto Garcia
  2026-03-12 12:12 ` [PATCH v3 1/1] throttle-group: " Alberto Garcia
  2026-03-16 16:36 ` [PATCH v3 0/1] " Hanna Czenczek
  0 siblings, 2 replies; 4+ messages in thread
From: Alberto Garcia @ 2026-03-12 12:11 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alberto Garcia, Jorge Merlino, Kevin Wolf, qemu-block,
	Hanna Czenczek

Hi,

In the previous patch I forgot to relax the assertion for case 2.

If we're restarting the queue when another tgm has a timer armed I
don't think we can guarantee that when the timer fires it won't set a
new timer on our own tgm before we reach the assertion.

I think that the assertion should depend on reset_timer_armed:

- If it's true, no one else can arm a timer so the assertion holds.
- If it's false, it is possible for the other tgm to arm our timer.
  The assertion would fail in this case, but I think it's harmless
  because even if it would fire at the same time the logic in
  throttle_group_restart_queue_entry() is protected by the lock.

Berto

Alberto Garcia (1):
  throttle-group: Fix race condition in throttle_group_restart_queue()

 block/throttle-groups.c | 79 +++++++++++++++++++++++++++++++----------
 1 file changed, 60 insertions(+), 19 deletions(-)

-- 
2.47.3



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-16 16:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12 12:11 [PATCH v3 0/1] Fix race condition in throttle_group_restart_queue() Alberto Garcia
2026-03-12 12:12 ` [PATCH v3 1/1] throttle-group: " Alberto Garcia
2026-03-12 19:44   ` Jorge Merlino
2026-03-16 16:36 ` [PATCH v3 0/1] " Hanna Czenczek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.