diff options
author | Cedric Le Goater <clg@fr.ibm.com> | 2006-10-02 05:18:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:21 -0400 |
commit | fab413a334a7b3dd2688c5cd5d4718476e430ea4 (patch) | |
tree | 2ffc4f9e97545bbd3608636abc0b4d9d4c09847c | |
parent | 1651e14e28a2d9f446018ef522882e0709a2ce4f (diff) |
[PATCH] namespaces: exit_task_namespaces() invalidates nsproxy
exit_task_namespaces() has replaced the former exit_namespace(). It
invalidates task->nsproxy and associated namespaces. This is an issue for
the (futur) pid namespace which is required to be valid in exit_notify().
This patch moves exit_task_namespaces() after exit_notify() to keep nsproxy
valid.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-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 741bbe42dfe8..f250a5e3e281 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -920,7 +920,6 @@ fastcall NORET_TYPE void do_exit(long code) | |||
920 | exit_sem(tsk); | 920 | exit_sem(tsk); |
921 | __exit_files(tsk); | 921 | __exit_files(tsk); |
922 | __exit_fs(tsk); | 922 | __exit_fs(tsk); |
923 | exit_task_namespaces(tsk); | ||
924 | exit_thread(); | 923 | exit_thread(); |
925 | cpuset_exit(tsk); | 924 | cpuset_exit(tsk); |
926 | exit_keys(tsk); | 925 | exit_keys(tsk); |
@@ -935,6 +934,7 @@ fastcall NORET_TYPE void do_exit(long code) | |||
935 | tsk->exit_code = code; | 934 | tsk->exit_code = code; |
936 | proc_exit_connector(tsk); | 935 | proc_exit_connector(tsk); |
937 | exit_notify(tsk); | 936 | exit_notify(tsk); |
937 | exit_task_namespaces(tsk); | ||
938 | #ifdef CONFIG_NUMA | 938 | #ifdef CONFIG_NUMA |
939 | mpol_free(tsk->mempolicy); | 939 | mpol_free(tsk->mempolicy); |
940 | tsk->mempolicy = NULL; | 940 | tsk->mempolicy = NULL; |