diff options
author | Serge E. Hallyn <serue@us.ibm.com> | 2007-01-30 16:28:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-01-30 16:40:36 -0500 |
commit | 0f2452855d86901ba3766826ccb5606ea4e15ab9 (patch) | |
tree | b5a48b7bc49bbfdf97434e4f9cc83607d78eb0de /kernel/exit.c | |
parent | 444f378b237a0f728f5c4aba752c08d13c209344 (diff) |
[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/exit.c')
-rw-r--r-- | kernel/exit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 35401720635b..fec12eb12471 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -938,8 +938,8 @@ fastcall NORET_TYPE void do_exit(long code) | |||
938 | 938 | ||
939 | tsk->exit_code = code; | 939 | tsk->exit_code = code; |
940 | proc_exit_connector(tsk); | 940 | proc_exit_connector(tsk); |
941 | exit_notify(tsk); | ||
942 | exit_task_namespaces(tsk); | 941 | exit_task_namespaces(tsk); |
942 | exit_notify(tsk); | ||
943 | #ifdef CONFIG_NUMA | 943 | #ifdef CONFIG_NUMA |
944 | mpol_free(tsk->mempolicy); | 944 | mpol_free(tsk->mempolicy); |
945 | tsk->mempolicy = NULL; | 945 | tsk->mempolicy = NULL; |