Commit:     2e4a707269a409950c3f315010c20f9719c594e2
Parent:     762a24beed3f3ab93224bd447710e6c36fcf1968
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 23:40:01 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Oct 19 11:53:38 2007 -0700

    pid namespaces: move exit_task_namespaces()
    Make task release its namespaces after it has reparented all his children to
    child_reaper, but before it notifies its parent about its death.
    The reason to release namespaces after reparenting is that when task exits 
    may send a signal to its parent (SIGCHLD), but if the parent has already
    exited its namespaces there will be no way to decide what pid to dever to 
    - parent can be from different namespace.
    The reason to release namespace before notifying the parent it that when 
    sends a SIGCHLD to parent it can call wait() on this taks and release it.  
    releasing the mnt namespace implies dropping of all the mounts in the mnt
    namespace and NFS expects the task to have valid sighand pointer.
    Thanks to Oleg for pointing out some races that can apear and helping with
    patches and fixes.
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Cc: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: Sukadev Bhattiprolu <[EMAIL PROTECTED]>
    Cc: Paul Menage <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/exit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index 3f2182c..df2eee9 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -774,6 +774,7 @@ static void exit_notify(struct task_struct *tsk)
         *      jobs, send them a SIGHUP and then a SIGCONT.  (POSIX
+       exit_task_namespaces(tsk);
@@ -984,7 +985,6 @@ fastcall NORET_TYPE void do_exit(long code)
-       exit_task_namespaces(tsk);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to