[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170213180131.GA2699@redhat.com>
Date: Mon, 13 Feb 2017 19:01:31 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Mika Penttilä <mika.penttila@...tfour.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Aleksa Sarai <asarai@...e.com>,
Andy Lutomirski <luto@...capital.net>,
Attila Fazekas <afazekas@...hat.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Jann Horn <jann@...jh.net>, Kees Cook <keescook@...omium.org>,
Michal Hocko <mhocko@...nel.org>,
Ulrich Obergfell <uobergfe@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] exec: don't wait for zombie threads with
cred_guard_mutex held
On 02/13, Mika Penttilä wrote:
>
> > +int de_thread(struct task_struct *tsk)
> > {
> > struct signal_struct *sig = tsk->signal;
> > struct sighand_struct *oldsighand = tsk->sighand;
> > @@ -1051,60 +1100,24 @@ static int de_thread(struct task_struct *tsk)
> > if (thread_group_empty(tsk))
> > goto no_thread_group;
> >
> > - /*
> > - * Kill all other threads in the thread group.
> > - */
> > spin_lock_irq(lock);
> > - if (signal_group_exit(sig)) {
> > - /*
> > - * Another group action in progress, just
> > - * return so that the signal is processed.
> > - */
> > - spin_unlock_irq(lock);
> > - return -EAGAIN;
> > - }
> > -
> > - sig->group_exit_task = tsk;
> > - sig->notify_count = zap_other_threads(tsk);
> > + sig->notify_count = sig->nr_threads;
>
>
> maybe nr_threads - 1 since nr_threads includes us ?
Damn. Of course you are right, thanks a lot! Please see v2.
Hmm. I didn't even notice my own test-case didn't pass because of this
off-by-one.
Oleg.
Powered by blists - more mailing lists