From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Daniel Jacobowitz <dan@debian.org>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove BUG_ON(p->ptrace) in release_task()
Date: Mon, 02 Sep 2002 22:33:16 +0900 [thread overview]
Message-ID: <87k7m4ikir.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <20020901193313.GA23985@nevyn.them.org>
Daniel Jacobowitz <dan@debian.org> writes:
> On Mon, Sep 02, 2002 at 02:38:03AM +0900, OGAWA Hirofumi wrote:
> > Hi,
> >
> > I think, BUG_ON(p->ptrace) will be called if the CLONE_DETACH process
> > is traced. This patch removes BUG_ON(p->ptrace), and also removes
> > BUG_ON(p->ptrace) workaround in sys_wait4().
>
> The BUG_ON is correct, and that isn't a workaround - if the list is not
> empty, then it will be garbage after the task struct is freed. Your
> patch breaks tracing of normal processes again, because the ptrace_list
> will not be empty.
Whoops, yes, I'm wrong. Sorry. My fixes wasn't enough. However, looks
like your case called the following BUG().
sys_ptrace()
-> ptrace_attach()
-> __ptrace_link()
void __ptrace_link(task_t *child, task_t *new_parent)
{
if (!list_empty(&child->ptrace_list))
BUG();
if (child->parent == new_parent)
BUG(); <--- this
list_add(&child->ptrace_list, &child->parent->ptrace_children);
REMOVE_LINKS(child);
So, I need to look source more. Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
prev parent reply other threads:[~2002-09-02 13:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-01 17:38 [PATCH] remove BUG_ON(p->ptrace) in release_task() OGAWA Hirofumi
2002-09-01 19:33 ` Daniel Jacobowitz
2002-09-02 13:33 ` OGAWA Hirofumi [this message]
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=87k7m4ikir.fsf@devron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=dan@debian.org \
--cc=linux-kernel@vger.kernel.org \
--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