lkml.org 
[lkml]   [2018]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 6/6] signal: Don't restart fork when signals come in.
On Wed, Aug 8, 2018 at 11:57 PM Eric W. Biederman <ebiederm@xmission.com> wrote:
>
> The code was being overly pesimistic.

Pessimistic.

> + if (type > PIDTYPE_TGID) {
> + struct multiprocess_signals *delayed;
> + hlist_for_each_entry(delayed, &t->signal->multiprocess, node) {
> + sigset_t *signal = &delayed->signal;
> + /* Can't queue both a stop and a continue signal */
> + if (sig == SIGCONT) {
> + sigset_t flush;
> + siginitset(&flush, SIG_KERNEL_STOP_MASK);
> + sigandnsets(signal, signal, &flush);

This looks odd and unnecessary.

Why isn't this just a

sigdelsetmask(signal, SIG_KERNEL_STOP_MASK);

since all of the traditional stop bits should be in the low mask.

I see that we apparently have this stupid pattern elsewhere too, and
it looks like it's because we stupidly say "are the RT signals in the
non-legacy set", when that definitely cannot be the case for the (very
much legacy) tty flow control signals.

Linus

\
 
 \ /
  Last update: 2018-08-09 19:17    [W:0.093 / U:0.728 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site