]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] namespaces: fix task exit disaster
authorSerge E. Hallyn <serue@us.ibm.com>
Tue, 30 Jan 2007 21:28:23 +0000 (15:28 -0600)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 30 Jan 2007 21:40:36 +0000 (13:40 -0800)
commitb2cc15be592399c41e46b7f3de6b6b5fb1f6fd49
treeb5a48b7bc49bbfdf97434e4f9cc83607d78eb0de
parent7d394fae69f5fb9075def4d918f2dfe574ce96d8
[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>
include/linux/pid_namespace.h
kernel/exit.c
kernel/pid.c