[PATCH 3/4] move exit_ptrace() from forget_original_parent() todo_exit()

From: Oleg Nesterov
Date: Wed Feb 11 2009 - 16:15:44 EST


By discussion with Roland.

Call exit_ptrace() from do_exit(), no need to delay this call until
forget_original_parent().

If we ever change exit_ptrace() to do the blocking calls, it makes
sense to move it after exit_signals().

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- 6.29-rc3/kernel/exit.c~3_MOVE 2009-02-11 06:37:36.000000000 +0100
+++ 6.29-rc3/kernel/exit.c 2009-02-11 07:20:54.000000000 +0100
@@ -803,8 +803,6 @@ static void forget_original_parent(struc
struct task_struct *p, *n, *reaper;
LIST_HEAD(dead_childs);

- exit_ptrace(father);
-
write_lock_irq(&tasklist_lock);
reaper = find_new_reaper(father);

@@ -956,6 +954,7 @@ NORET_TYPE void do_exit(long code)
schedule();
}

+ exit_ptrace(tsk);
exit_signals(tsk); /* sets PF_EXITING */
/*
* tsk->flags are checked in the futex code to protect against

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/