Re: [PATCH 01/14] signal: Generalize posixtimer_queue_sigqueue into enqueue_signal

From: Eric W. Biederman

Date: Tue Jul 07 2026 - 08:23:57 EST


Oleg Nesterov <oleg@xxxxxxxxxx> writes:

> On 07/03, Eric W. Biederman wrote:
>>
>> +static void enqueue_signal(struct task_struct *t, enum pid_type type,
>> + int sig, struct sigqueue *q)
>> +{
>> + struct signal_struct *signal = t->signal;
>> + struct sigpending *pending = (type != PIDTYPE_PID) ?
>> + &signal->shared_pending : &t->pending;
>> +
>> + signalfd_notify(t, sig);
>> + if (q) {
>> + list_add_tail(&q->list, &pending->list);
>> + }
>> + sigaddset(&pending->signal, sig);
>> + complete_signal(sig, t, type);
>> +}
>
> Hmm... __send_signal_locked() doesn't initialize the local "struct sigqueue *q", and
>
> if ((sig == SIGKILL) || (t->flags & PF_KTHREAD))
> goto out_set;
>
> will pass it to enqueue_signal().

Doh! Thank you for catching that. That is an embarrassing oversight.
Fixed in my tree now.

Eric