aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 3b47f26985f2..1d0e9ea1fa05 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -21,6 +21,7 @@
21#include <linux/tsacct_kern.h> 21#include <linux/tsacct_kern.h>
22#include <linux/file.h> 22#include <linux/file.h>
23#include <linux/binfmts.h> 23#include <linux/binfmts.h>
24#include <linux/nsproxy.h>
24#include <linux/ptrace.h> 25#include <linux/ptrace.h>
25#include <linux/profile.h> 26#include <linux/profile.h>
26#include <linux/mount.h> 27#include <linux/mount.h>
@@ -397,9 +398,14 @@ void daemonize(const char *name, ...)
397 fs = init_task.fs; 398 fs = init_task.fs;
398 current->fs = fs; 399 current->fs = fs;
399 atomic_inc(&fs->count); 400 atomic_inc(&fs->count);
401
400 exit_namespace(current); 402 exit_namespace(current);
403 exit_task_namespaces(current);
401 current->namespace = init_task.namespace; 404 current->namespace = init_task.namespace;
405 current->nsproxy = init_task.nsproxy;
402 get_namespace(current->namespace); 406 get_namespace(current->namespace);
407 get_task_namespaces(current);
408
403 exit_files(current); 409 exit_files(current);
404 current->files = init_task.files; 410 current->files = init_task.files;
405 atomic_inc(&current->files->count); 411 atomic_inc(&current->files->count);
@@ -918,6 +924,7 @@ fastcall NORET_TYPE void do_exit(long code)
918 __exit_files(tsk); 924 __exit_files(tsk);
919 __exit_fs(tsk); 925 __exit_fs(tsk);
920 exit_namespace(tsk); 926 exit_namespace(tsk);
927 exit_task_namespaces(tsk);
921 exit_thread(); 928 exit_thread();
922 cpuset_exit(tsk); 929 cpuset_exit(tsk);
923 exit_keys(tsk); 930 exit_keys(tsk);