[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87imi8nzlw.fsf@x220.int.ebiederm.org>
Date: Thu, 09 Apr 2020 16:00:43 -0500
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Bernd Edlinger <bernd.edlinger@...mail.de>,
Waiman Long <longman@...hat.com>,
Ingo Molnar <mingo@...nel.org>, Will Deacon <will@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alexey Gladkov <gladkov.alexey@...il.com>,
Oleg Nesterov <oleg@...hat.com>
Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1
Linus Torvalds <torvalds@...ux-foundation.org> writes:
> On Thu, Apr 9, 2020 at 12:57 PM Bernd Edlinger
> <bernd.edlinger@...mail.de> wrote:
>>
>> The use case where this may happen with strace
>> when you call strace with lots of -p <pid> arguments,
>> and one of them is a bomb. strace stuck.
>
> Yeah, so from a convenience angle I do agree that it would be nicer to
> just not count dead threads.
>
> You can test that by just moving the
>
> /* Don't bother with already dead threads */
> if (t->exit_state)
> continue;
>
> test in zap_other_threads() to above the
>
> count++;
>
> line instead.
That looks like a legitimate race, and something worth addressing. It
doesn't look like t->exit_state has siglock protection so I don't think
testing it under siglock would fix that race. But something like that
certainly should.
But no. While you are goind a good job at spotting odd corner
cases that need to be fixed. This also is not the cause of the
deadlock. It is nothing that subtle.
Eric
Powered by blists - more mailing lists