Re: [PATCH 5/6][v5] Protect cinit from blocked fatal signals

Oleg Nesterov
2009-01-05T15:18:47Z

On 12/27, Sukadev Bhattiprolu wrote:
>
> + * Container-init gets no signals it doesn't want from same
> + * container.
> */
> - if (unlikely(signal->flags & SIGNAL_UNKILLABLE) &&
> - !signal_group_exit(signal))
> + if ((signal->flags & SIGNAL_UNKILLABLE) &&
> + !sig_kernel_only(signr))

minor, but why did you remove unlikely() ?

And could you improve the changelog a bit? Please explain
that !signal_group_exit() was needed to handle the case
when the mt init does exit/exec and sends SIGKILL to all
sub-threads. Now this is covered by sig_kernel_only().

In short, please explain that if SIGNAL_UNKILLABLE task
sees the sig_kernel_only() signal here, then it was either
sent by the parent namespace or it was generated internally.
In both cases we should not drop it.

But your current changelog mostly explains why do we need
another SIGNAL_UNKILLABLE check in get_signal_to_deliver(),
this is orthogonal to the change itself.

Oleg.