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) ...@@ -66,8 +66,7 @@ static void release_task(struct task_struct * p)
atomic_dec(&p->user->processes); atomic_dec(&p->user->processes);
security_ops->task_free_security(p); security_ops->task_free_security(p);
free_uid(p->user); free_uid(p->user);
BUG_ON(p->ptrace || !list_empty(&p->ptrace_list) || BUG_ON(!list_empty(&p->ptrace_list) || !list_empty(&p->ptrace_children));
!list_empty(&p->ptrace_children));
unhash_process(p); unhash_process(p);
release_thread(p); release_thread(p);
...@@ -717,14 +716,8 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc ...@@ -717,14 +716,8 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc
ptrace_unlink(p); ptrace_unlink(p);
do_notify_parent(p, SIGCHLD); do_notify_parent(p, SIGCHLD);
write_unlock_irq(&tasklist_lock); write_unlock_irq(&tasklist_lock);
} else { } else
if (p->ptrace) {
write_lock_irq(&tasklist_lock);
ptrace_unlink(p);
write_unlock_irq(&tasklist_lock);
}
release_task(p); release_task(p);
}
goto end_wait4; goto end_wait4;
default: default:
continue; 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