[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] Add timer_join to avoid racing in timer cleanup
From: |
Roman Kiryanov |
Subject: |
Re: [PATCH v4] Add timer_join to avoid racing in timer cleanup |
Date: |
Sun, 21 Jul 2024 23:00:00 -0700 |
Hi Paolo,
could you please take a look? If you don't like my patch I will be
happy if you suggest your solution for this problem.
We can help with reviewing it.
I grepped through the QEMU sources and found timer_del is called from
a separate thread in accel/tcg/tcg-accel-ops-rr.c.
It does not use the opaque pointer, so this is not exactly the same
issue I sent the patch for, but QEMU already has
timer_del inside a separate thread.
Another solution (to adding timer_join) here could be guaranteeing
that the timer callback will not fire after timer_del is called.
This would be beneficial for accel/tcg/tcg-accel-ops-rr.c.
Regards,
Roman.