[lkml]   [2002]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] remove BUG_ON(p->ptrace) in release_task()
Daniel Jacobowitz <> 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().

-> ptrace_attach()
-> __ptrace_link()

void __ptrace_link(task_t *child, task_t *new_parent)
if (!list_empty(&child->ptrace_list))
if (child->parent == new_parent)
BUG(); <--- this
list_add(&child->ptrace_list, &child->parent->ptrace_children);

So, I need to look source more. Thanks.
OGAWA Hirofumi <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.118 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site