Re: [PATCH v4] Add timer_join to avoid racing in timer cleanup

2024-07-21 Thread Roman Kiryanov
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

Re: [PATCH v4] Add timer_join to avoid racing in timer cleanup

2024-07-08 Thread Roman Kiryanov
Hi Paolo, could you please take a look? Regards, Roman.

[PATCH v4] Add timer_join to avoid racing in timer cleanup

2024-07-01 Thread Roman Kiryanov
Currently there is no mechanism guaranteeing that it is safe to delete the object pointed by opaque in timer_init. This race condition happens if a timer is created on a separate thread and timer_del is called between qemu_mutex_unlock and cb(opaque) in timerlist_run_timers. In this case the user