Commit 0f64db60 authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] remove BUG_ON(p->ptrace) in release_task()

The BUG_ON(p->ptrace) will be called if the CLONE_DETACH process is
traced.  This patch removes BUG_ON(p->ptrace), and also removes a
workaround for it in sys_wait4().
parent b5b2042e
......@@ -66,8 +66,7 @@ static void release_task(struct task_struct * p)
atomic_dec(&p->user->processes);
security_ops->task_free_security(p);
free_uid(p->user);
BUG_ON(p->ptrace || !list_empty(&p->ptrace_list) ||
!list_empty(&p->ptrace_children));
BUG_ON(!list_empty(&p->ptrace_list) || !list_empty(&p->ptrace_children));
unhash_process(p);
release_thread(p);
......@@ -717,14 +716,8 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc
ptrace_unlink(p);
do_notify_parent(p, SIGCHLD);
write_unlock_irq(&tasklist_lock);
} else {
if (p->ptrace) {
write_lock_irq(&tasklist_lock);
ptrace_unlink(p);
write_unlock_irq(&tasklist_lock);
}
} else
release_task(p);
}
goto end_wait4;
default:
continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment