From: Bill Huey (hui) <billh@gnuppy.monkey.org>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org, Joe Taylor <joe@tensilica.com>
Subject: Re: [PATCH 1/3] futex_find_get_task: remove an obscure EXIT_ZOMBIE check
Date: Tue, 22 Aug 2006 15:03:20 -0700 [thread overview]
Message-ID: <20060822220320.GA8365@gnuppy.monkey.org> (raw)
In-Reply-To: <20060822183431.GB469@oleg>
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
On Tue, Aug 22, 2006 at 10:34:31PM +0400, Oleg Nesterov wrote:
> On 08/21, Bill Huey wrote:
> > On Mon, Aug 21, 2006 at 09:06:04PM +0400, Oleg Nesterov wrote:
> > > (Compile tested).
> > >
> > > futex_find_get_task:
> > >
> > > if (p->state == EXIT_ZOMBIE || p->exit_state == EXIT_ZOMBIE)
> > > return NULL;
> > >
> > > I can't understand this. First, p->state can't be EXIT_ZOMBIE. The ->exit_state
> > > check looks strange too. Sub-threads or tasks whose ->parent ignores SIGCHLD go
> > > directly to EXIT_DEAD state (I am ignoring a ptrace case). Why EXIT_DEAD tasks
> > > should be ok? Yes, EXIT_ZOMBIE is more important (a task may stay zombie for a
> > > long time), but this doesn't mean we should explicitely ignore other EXIT_XXX
> > > states.
> >
> > The p->state variable for EXIT_ZOMBIE is only live for some mystery architecture
> > in arch/xtensa/kernel/ptrace.c
>
> Thanks. This
>
> case PTRACE_KILL:
> ret = 0;
> if (child->state == EXIT_ZOMBIE) /* already dead */
> break;
>
> is an obvious bug, I beleive. May I suggest you to make a patch?
Oleg,
Here is it. Maintainers CCed...
bill
[-- Attachment #2: t.diff --]
[-- Type: text/plain, Size: 665 bytes --]
#
# old_revision [d374cc860b7089468eb87b56425bb462a955b138]
#
# patch "arch/xtensa/kernel/ptrace.c"
# from [4ae4da59c97b72d41f6d2b38ef83f33ee8e5e3e3]
# to [6be23f16368960b0da9f77911406e7c495396001]
#
============================================================
--- arch/xtensa/kernel/ptrace.c 4ae4da59c97b72d41f6d2b38ef83f33ee8e5e3e3
+++ arch/xtensa/kernel/ptrace.c 6be23f16368960b0da9f77911406e7c495396001
@@ -212,7 +212,7 @@
*/
case PTRACE_KILL:
ret = 0;
- if (child->state == EXIT_ZOMBIE) /* already dead */
+ if (child->exit_state == EXIT_ZOMBIE) /* already dead */
break;
child->exit_code = SIGKILL;
child->ptrace &= ~PT_SINGLESTEP;
next prev parent reply other threads:[~2006-08-22 22:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-21 17:06 [PATCH 1/3] futex_find_get_task: remove an obscure EXIT_ZOMBIE check Oleg Nesterov
2006-08-22 0:01 ` Bill Huey
2006-08-22 18:34 ` Oleg Nesterov
2006-08-22 22:03 ` Bill Huey [this message]
2006-08-22 10:43 ` Ingo Molnar
2006-08-22 19:10 ` Oleg Nesterov
2006-08-25 10:28 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060822220320.GA8365@gnuppy.monkey.org \
--to=billh@gnuppy.monkey.org \
--cc=akpm@osdl.org \
--cc=joe@tensilica.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox