Re: [PATCH v3 5/6] pid: perform free_pid() calls outside of tasklist_lock

From: Oleg Nesterov
Date: Mon Feb 03 2025 - 13:50:12 EST


To avoid the confusion, my question and a note are absolutely offtopic.

On 02/01, Mateusz Guzik wrote:
>
> @@ -1085,6 +1085,7 @@ SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid)
> {
> struct task_struct *p;
> struct task_struct *group_leader = current->group_leader;
> + struct pid *pids[PIDTYPE_MAX] = { 0 };

Could you remind me why

struct pid *pids[PIDTYPE_MAX] = {};

is not right? I seem to knew it some time before, but can't recall...

And just for the record, a note for myself. I need to recheck, but it seems
that the comment above flush_sigqueue(&tsk->pending) in __exit_signal() is
obsolete, so with some minimal changes we can move more work outside of
tasklist.

Oleg.