Re: [patch V5 17/26] posix-timers: Embed sigqueue in struct k_itimer
From: Thomas Gleixner
Date: Wed Oct 30 2024 - 10:34:23 EST
On Wed, Oct 30 2024 at 14:55, Frederic Weisbecker wrote:
> Le Tue, Oct 01, 2024 at 10:42:23AM +0200, Thomas Gleixner a écrit :
>> - if (timr->it_signal_seq != info->si_sys_private)
>> + /*
>> + * Check if the timer is still alive or whether it got modified
>> + * since the signal was queued. In either case, don't rearm and
>> + * drop the signal.
>> + */
>> + if (!timr->it_signal || timr->it_signal_seq != info->si_sys_private)
>> goto out_unlock;
>
> It could be:
>
> if (timr->it_signal_seq != info->si_sys_private ||
> WARN_ON_ONCE(!timr->it_signal))
> goto out_unlock;
>
> Because if the timer has been deleted, the current seq should be different from
> the queued seq.
Indeed