On 2022-10-05 23:08:19 [+0200], Jason A. Donenfeld wrote: > Hi Sebastian, Hi Jason, > On Wed, Oct 05, 2022 at 07:26:42PM +0200, Sebastian Andrzej Siewior wrote: > > That del_timer_sync() at the end is what you want. If the timer is > > pending (as in enqueued in the timer wheel) then it will be removed > > before it is invoked. If the timer's callback is invoked then it will > > spin until the callback is done. > > del_timer_sync() is not guaranteed to succeed with add_timer_on() being > used in conjunction with timer_pending() though. That's why I've > abandoned this. But why? The timer is added to a timer-base on a different CPU. Should work. > Jason Sebastian