From: Björn Steinbrink Date: Sat, 18 Feb 2006 17:12:43 +0000 (+0100) Subject: [PATCH] kjournald keeps reference to namespace X-Git-Tag: v3.12-rc1~38309 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5914811acf36c3ff091f860a6964808f668f27d0;p=kernel%2Fkernel-generic.git [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 Acked-by: Eric Biederman Signed-off-by: Linus Torvalds --- diff --git a/kernel/exit.c b/kernel/exit.c index 93cee36..531aadc 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -360,6 +360,9 @@ void daemonize(const char *name, ...) fs = init_task.fs; current->fs = fs; atomic_inc(&fs->count); + exit_namespace(current); + current->namespace = init_task.namespace; + get_namespace(current->namespace); exit_files(current); current->files = init_task.files; atomic_inc(¤t->files->count);