aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-18 12:12:43 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-20 23:27:38 -0500
commit5914811acf36c3ff091f860a6964808f668f27d0 (patch)
tree04317a64fa5e76a13f29de655fe354abd627445d /kernel/exit.c
parent6d7b9efacba9f4e5f4d5ca165b1a4350da52ddd7 (diff)
[PATCH] kjournald keeps reference to namespace
In daemonize() a new thread gets cleaned up and 'merged' with init_task. The current fs_struct is handled there, but not the current namespace. This adds the namespace part. [ Eric Biederman pointed out the namespace wrappers, and also notes that we can't ever count on using our parents namespace because we already have called exit_fs(), which is the only way to the namespace from a process. ] Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Acked-by: Eric Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 93cee3671332..531aadca5530 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -360,6 +360,9 @@ void daemonize(const char *name, ...)
360 fs = init_task.fs; 360 fs = init_task.fs;
361 current->fs = fs; 361 current->fs = fs;
362 atomic_inc(&fs->count); 362 atomic_inc(&fs->count);
363 exit_namespace(current);
364 current->namespace = init_task.namespace;
365 get_namespace(current->namespace);
363 exit_files(current); 366 exit_files(current);
364 current->files = init_task.files; 367 current->files = init_task.files;
365 atomic_inc(&current->files->count); 368 atomic_inc(&current->files->count);