Re: [PATCH 0/1] exit: kill signal_struct->quick_threads

From: Oleg Nesterov
Date: Mon Jun 10 2024 - 12:20:56 EST


On 06/10, Oleg Nesterov wrote:
>
> > At the moment I am staring at wait_task_zombie and trying to understand
> > how:
> >
> > status = (p->signal->flags & SIGNAL_GROUP_EXIT)
> > ? p->signal->group_exit_code : p->exit_code;
> >
> > works without any locks or barriers.
>
> Agreed, at first glance this looks worrying without siglock... I'll try
> to take a look, perhaps we can simply kill the SIGNAL_GROUP_EXIT check,
> not sure.

Still not sure, will check tomorrow, but probably yes. We can rely on the
the exit_state == EXIT_ZOMBIE check in the caller and tasklist_lock.
OTOH, we should probably take ptrace into account...

In short, I am still not sure ;) but I agree this code needs some changes,
the comments at least.

> But this patch should not make any difference ?

Yes.

Oleg.