From 0ee72fd24259da7cad56d4b71110047b439bb3d0 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Fri, 14 Apr 2006 04:05:55 -0600 Subject: [PATCH] --- yaml --- r: 25711 b: refs/heads/master c: c06511d12d720b23c8dffff23004f0a888698f20 h: refs/heads/master i: 25709: 1fe2e8ae366bb4f4ad76edc95aff5dd1ca7ac69c 25707: a1106c559423c99e12d8fbaaa0d56f5801a0c531 25703: b639940a5777d7c54aec0446cb8cfbce9fed0120 25695: 71f01d002b12a3c627799735ea9756eebfe20210 v: v3 --- [refs] | 2 +- trunk/fs/exec.c | 27 --------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/[refs] b/[refs] index 692fa1a6fe5a..44e4eb94daf0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0e5e24bf64b755a034d8294303bc61d8f40ebeaf +refs/heads/master: c06511d12d720b23c8dffff23004f0a888698f20 diff --git a/trunk/fs/exec.c b/trunk/fs/exec.c index 3234a0c32d54..4121bb559739 100644 --- a/trunk/fs/exec.c +++ b/trunk/fs/exec.c @@ -665,9 +665,7 @@ static int de_thread(struct task_struct *tsk) * and to assume its PID: */ if (!thread_group_leader(current)) { - struct task_struct *parent; struct dentry *proc_dentry1, *proc_dentry2; - unsigned long ptrace; /* * Wait for the thread group leader to be a zombie. @@ -704,22 +702,6 @@ static int de_thread(struct task_struct *tsk) * two threads with a switched PID, and release * the former thread group leader: */ - ptrace = leader->ptrace; - parent = leader->parent; - if (unlikely(ptrace) && unlikely(parent == current)) { - /* - * Joker was ptracing his own group leader, - * and now he wants to be his own parent! - * We can't have that. - */ - ptrace = 0; - } - - ptrace_unlink(current); - ptrace_unlink(leader); - remove_parent(current); - remove_parent(leader); - /* Become a process group leader with the old leader's pid. * Note: The old leader also uses thispid until release_task @@ -732,8 +714,6 @@ static int de_thread(struct task_struct *tsk) attach_pid(current, PIDTYPE_SID, current->signal->session); list_add_tail(¤t->tasks, &init_task.tasks); - current->parent = current->real_parent = leader->real_parent; - leader->parent = leader->real_parent = child_reaper; current->group_leader = current; leader->group_leader = current; @@ -742,13 +722,6 @@ static int de_thread(struct task_struct *tsk) detach_pid(leader, PIDTYPE_SID); list_del_init(&leader->tasks); - add_parent(current); - add_parent(leader); - if (ptrace) { - current->ptrace = ptrace; - __ptrace_link(current, parent); - } - current->exit_signal = SIGCHLD; BUG_ON(leader->exit_state != EXIT_ZOMBIE);