From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@transmeta.com>,
<linux-kernel@vger.kernel.org>,
Daniel Jacobowitz <drow@false.org>
Subject: Re: [PATCH] Fix for ptrace breakage
Date: Mon, 16 Sep 2002 20:41:06 +0900 [thread overview]
Message-ID: <87bs6y6u25.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <Pine.LNX.4.44.0209161322260.28163-100000@localhost.localdomain>
Ingo Molnar <mingo@elte.hu> writes:
> > This patch fixes the following,
> >
> > - race condition of ptrace flag
> > - sent odd signal to the tracer
> > - broken before behavior
>
> (looks good to me). I'm wondering about the following:
>
> - while (!list_empty(¤t->children))
> - zap_thread(list_entry(current->children.next,struct task_struct,sibling), current, 0);
> - while (!list_empty(¤t->ptrace_children))
> - zap_thread(list_entry(current->ptrace_children.next,struct task_struct,ptrace_list), current, 1);
> + while ((p = eldest_child(current)) != NULL)
> + zap_thread(p, current);
> BUG_ON(!list_empty(¤t->children));
>
> is it guaranteed that at this point current->ptrace_children is empty?
Yes, I think so.
list_for_each(_p, &father->ptrace_children) {
p = list_entry(_p,struct task_struct,ptrace_list);
list_del_init(&p->ptrace_list);
reparent_thread(p, reaper, child_reaper);
if (p->parent != p->real_parent)
list_add(&p->ptrace_list, &p->real_parent->ptrace_children);
}
current->ptrace_children should be empty after this reparent.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2002-09-16 11:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 10:56 OGAWA Hirofumi
2002-09-16 11:23 ` Ingo Molnar
2002-09-16 11:41 ` OGAWA Hirofumi [this message]
2002-09-16 11:50 ` Ingo Molnar
2002-09-16 11:58 ` OGAWA Hirofumi
2002-09-16 12:44 ` OGAWA Hirofumi
2002-09-16 13:07 ` Daniel Jacobowitz
2002-09-16 14:28 ` OGAWA Hirofumi
2002-09-16 14:42 ` Daniel Jacobowitz
2002-09-16 15:57 ` OGAWA Hirofumi
2002-09-16 16:05 ` Daniel Jacobowitz
2002-09-16 17:44 ` OGAWA Hirofumi
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=87bs6y6u25.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=drow@false.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®