Lines Matching refs:nsproxy
32 struct nsproxy init_nsproxy = {
52 static inline struct nsproxy *create_nsproxy(void) in create_nsproxy()
54 struct nsproxy *nsproxy; in create_nsproxy() local
56 nsproxy = kmem_cache_alloc(nsproxy_cachep, GFP_KERNEL); in create_nsproxy()
57 if (nsproxy) in create_nsproxy()
58 refcount_set(&nsproxy->count, 1); in create_nsproxy()
59 return nsproxy; in create_nsproxy()
67 static struct nsproxy *create_new_namespaces(unsigned long flags, in create_new_namespaces()
71 struct nsproxy *new_nsp; in create_new_namespaces()
78 new_nsp->mnt_ns = copy_mnt_ns(flags, tsk->nsproxy->mnt_ns, user_ns, new_fs); in create_new_namespaces()
84 new_nsp->uts_ns = copy_utsname(flags, user_ns, tsk->nsproxy->uts_ns); in create_new_namespaces()
90 new_nsp->ipc_ns = copy_ipcs(flags, user_ns, tsk->nsproxy->ipc_ns); in create_new_namespaces()
97 copy_pid_ns(flags, user_ns, tsk->nsproxy->pid_ns_for_children); in create_new_namespaces()
104 tsk->nsproxy->cgroup_ns); in create_new_namespaces()
110 new_nsp->net_ns = copy_net_ns(flags, user_ns, tsk->nsproxy->net_ns); in create_new_namespaces()
117 tsk->nsproxy->time_ns_for_children); in create_new_namespaces()
122 new_nsp->time_ns = get_time_ns(tsk->nsproxy->time_ns); in create_new_namespaces()
153 struct nsproxy *old_ns = tsk->nsproxy; in copy_namespaces()
155 struct nsproxy *new_ns; in copy_namespaces()
186 tsk->nsproxy = new_ns; in copy_namespaces()
190 void free_nsproxy(struct nsproxy *ns) in free_nsproxy()
214 struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) in unshare_nsproxy_namespaces()
239 void switch_task_namespaces(struct task_struct *p, struct nsproxy *new) in switch_task_namespaces()
241 struct nsproxy *ns; in switch_task_namespaces()
246 ns = p->nsproxy; in switch_task_namespaces()
247 p->nsproxy = new; in switch_task_namespaces()
262 struct nsproxy *new; in exec_task_namespaces()
264 if (tsk->nsproxy->time_ns_for_children == tsk->nsproxy->time_ns) in exec_task_namespaces()
327 if (nsset->nsproxy) in put_nsset()
328 free_nsproxy(nsset->nsproxy); in put_nsset()
335 nsset->nsproxy = create_new_namespaces(0, me, current_user_ns(), me->fs); in prepare_nsset()
336 if (IS_ERR(nsset->nsproxy)) in prepare_nsset()
337 return PTR_ERR(nsset->nsproxy); in prepare_nsset()
381 struct nsproxy *nsp; in validate_nsset()
398 nsp = tsk->nsproxy; in validate_nsset()
538 timens_commit(me, nsset->nsproxy->time_ns); in commit_nsset()
542 switch_task_namespaces(me, nsset->nsproxy); in commit_nsset()
543 nsset->nsproxy = NULL; in commit_nsset()
589 nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC|SLAB_ACCOUNT); in nsproxy_cache_init()