From 0f2452855d86901ba3766826ccb5606ea4e15ab9 Mon Sep 17 00:00:00 2001 From: "Serge E. Hallyn" Date: Tue, 30 Jan 2007 15:28:23 -0600 Subject: [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 [ Eric's patch fixed to take care of free_pid() too ] Signed-off-by: Serge E. Hallyn Signed-off-by: Linus Torvalds --- include/linux/pid_namespace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index d2a9d419f01..2833806d42c 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h @@ -39,7 +39,7 @@ static inline void put_pid_ns(struct pid_namespace *ns) static inline struct task_struct *child_reaper(struct task_struct *tsk) { - return tsk->nsproxy->pid_ns->child_reaper; + return init_pid_ns.child_reaper; } #endif /* _LINUX_PID_NS_H */ -- cgit v1.2.3