public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch -mm] namespaces: exit_task_namespaces() invalidates nsproxy
@ 2006-09-21 16:20 Cedric Le Goater
  0 siblings, 0 replies; only message in thread
From: Cedric Le Goater @ 2006-09-21 16:20 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Andrew Morton, Serge E. Hallyn, Linux Containers

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>
---
 kernel/exit.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.18-rc7-mm1/kernel/exit.c
===================================================================
--- 2.6.18-rc7-mm1.orig/kernel/exit.c
+++ 2.6.18-rc7-mm1/kernel/exit.c
@@ -922,7 +922,6 @@ fastcall NORET_TYPE void do_exit(long co
 	exit_sem(tsk);
 	__exit_files(tsk);
 	__exit_fs(tsk);
-	exit_task_namespaces(tsk);
 	exit_thread();
 	cpuset_exit(tsk);
 	exit_keys(tsk);
@@ -937,6 +936,7 @@ fastcall NORET_TYPE void do_exit(long co
 	tsk->exit_code = code;
 	proc_exit_connector(tsk);
 	exit_notify(tsk);
+	exit_task_namespaces(tsk);
 #ifdef CONFIG_NUMA
 	mpol_free(tsk->mempolicy);
 	tsk->mempolicy = NULL;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-21 16:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-21 16:20 [patch -mm] namespaces: exit_task_namespaces() invalidates nsproxy Cedric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox