Re: [PATCH v2] timer: Fix a race condition between timer's callback and destroying code

2024-06-26 Thread Paolo Bonzini
On 6/26/24 23:52, Roman Kiryanov wrote: `timerlist_run_timers` provides no mechanism to make sure the data pointed by `opaque` is valid when calling timer's callback: there could be another thread running which is destroying timer's opaque data. With this change `timer_del` becomes blocking if

[PATCH v2] timer: Fix a race condition between timer's callback and destroying code

2024-06-26 Thread Roman Kiryanov
`timerlist_run_timers` provides no mechanism to make sure the data pointed by `opaque` is valid when calling timer's callback: there could be another thread running which is destroying timer's opaque data. With this change `timer_del` becomes blocking if timer's callback is running and it will be