[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87600jwi5r.fsf@xmission.com>
Date: Thu, 09 Aug 2018 12:42:40 -0500
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Wen Yang <wen.yang99@....com.cn>, majiang <ma.jiang@....com.cn>
Subject: Re: [PATCH v5 6/6] signal: Don't restart fork when signals come in.
Linus Torvalds <torvalds@...ux-foundation.org> writes:
> On Wed, Aug 8, 2018 at 11:57 PM Eric W. Biederman <ebiederm@...ssion.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.
I just missed the existence of sigdelsetmask when I was putting this
together.
I will fix that and unless someone sees an issue I will queue this up
for linux-next.
Eric
Powered by blists - more mailing lists