diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2007-01-30 22:28:23 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 22:40:36 +0100 |
commit | 0f2452855d86901ba3766826ccb5606ea4e15ab9 (patch) | |
tree | b5a48b7bc49bbfdf97434e4f9cc83607d78eb0de /kernel/pid.c | |
parent | Revert "[PATCH] namespaces: fix exit race by splitting exit" (diff) | |
download | linux-0f2452855d86901ba3766826ccb5606ea4e15ab9.tar.xz linux-0f2452855d86901ba3766826ccb5606ea4e15ab9.zip |
[PATCH] namespaces: fix task exit disaster
This is based on a patch by Eric W. Biederman, who pointed out that pid
namespaces are still fake, and we only have one ever active.
So for the time being, we can modify any code which could access
tsk->nsproxy->pid_ns during task exit to just use &init_pid_ns instead,
and move the exit_task_namespaces call in do_exit() back above
exit_notify(), so that an exiting nfs server has a valid tsk->sighand to
work with.
Long term, pulling pid_ns out of nsproxy might be the cleanest solution.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
[ Eric's patch fixed to take care of free_pid() too ]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/pid.c')
-rw-r--r-- | kernel/pid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/pid.c b/kernel/pid.c index 2efe9d8d367b..78f2aee90f54 100644 --- a/kernel/pid.c +++ b/kernel/pid.c @@ -197,7 +197,7 @@ fastcall void free_pid(struct pid *pid) hlist_del_rcu(&pid->pid_chain); spin_unlock_irqrestore(&pidmap_lock, flags); - free_pidmap(current->nsproxy->pid_ns, pid->nr); + free_pidmap(&init_pid_ns, pid->nr); call_rcu(&pid->rcu, delayed_put_pid); } |