Messages in this thread | | | From | (Eric W. Biederman) | Date | Thu, 09 Apr 2020 16:00:43 -0500 | Subject | Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1 |
| |
Linus Torvalds <torvalds@linux-foundation.org> writes:
> On Thu, Apr 9, 2020 at 12:57 PM Bernd Edlinger > <bernd.edlinger@hotmail.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
| |