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 atomic_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()
184 tsk->nsproxy = new_ns; in copy_namespaces()
188 void free_nsproxy(struct nsproxy *ns) in free_nsproxy()
212 struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) in unshare_nsproxy_namespaces()
237 void switch_task_namespaces(struct task_struct *p, struct nsproxy *new) in switch_task_namespaces()
239 struct nsproxy *ns; in switch_task_namespaces()
244 ns = p->nsproxy; in switch_task_namespaces()
245 p->nsproxy = new; in switch_task_namespaces()
308 if (nsset->nsproxy) in put_nsset()
309 free_nsproxy(nsset->nsproxy); in put_nsset()
316 nsset->nsproxy = create_new_namespaces(0, me, current_user_ns(), me->fs); in prepare_nsset()
317 if (IS_ERR(nsset->nsproxy)) in prepare_nsset()
318 return PTR_ERR(nsset->nsproxy); in prepare_nsset()
362 struct nsproxy *nsp; in validate_nsset()
379 nsp = tsk->nsproxy; in validate_nsset()
519 timens_commit(me, nsset->nsproxy->time_ns); in commit_nsset()
523 switch_task_namespaces(me, nsset->nsproxy); in commit_nsset()
524 nsset->nsproxy = NULL; in commit_nsset()
571 nsproxy_cachep = KMEM_CACHE(nsproxy, SLAB_PANIC|SLAB_ACCOUNT); in nsproxy_cache_init()