Re: [PATCH] kernel: Prevent prctl(PR_SET_PDEATHSIG) from racing with parent process exit

From: Oleg Nesterov

Date: Thu Sep 25 2025 - 14:52:17 EST


On 09/25, Mateusz Guzik wrote:
>
> It struck me that this mail thread is perhaps a little rude towards
> Demi, so I would like to state the reported race is legitimate and if
> it was reported against come core functionality it would count as
> "good spotting".

Agreed, agreed. Sorry if my emails were not clear in this respect.

Although let me repeat, I didn't know that people still rely on this API,
but this is is almost offtopic.

> > OK. I won't argue with this patch. At least the usage of tasklist_lock is well
> > documented.
> >
>
> ye.. avoiding smp_mb may be a case of "premature optimization", except
> it is also simpler, so that's a really tough call. good news is that
> it's not mine to make ;-)
>
> I guess if the lock acquire goes in the sky is not going to fall,
> worst case this can get revisited later. So fwiw I would be leaning
> towards accepting the patch as well for the time being.

Again, agreed, and sorry if it wasn't clear.

Thanks Demi.

Oleg.