Re: [PATCH] signal/posixtimers: Handle ignore/blocked sequences correctly
From: Thomas Gleixner
Date: Fri Dec 20 2024 - 08:14:19 EST
On Fri, Dec 20 2024 at 14:06, Frederic Weisbecker wrote:
> Le Thu, Dec 19, 2024 at 08:46:25PM +0100, Thomas Gleixner a écrit :
>> if (!list_empty(&q->list)) {
>> /*
>> - * If task group is exiting with the signal already pending,
>> - * wait for __exit_signal() to do its job. Otherwise if
>> - * ignored, it's not supposed to be queued. Try to survive.
>> + * The signal was ignored and blocked. The timer
>> + * expiry queued it because blocked signals are
>> + * queued independent of the ignored state.
>> + *
>> + * The unblocking set SIGPENDING, but the signal
>> + * was not yet dequeued from the pending list,
>> + * which would have put it back on the ignore list.
>
> I must be missing something. I don't see dequeue_signal() checking if a signal
> is ignored upon delivery.
Sorry, I meant get_signal() which is what the actual signal delivery
path on exit to user space invokes. dequeue itself does not care.