Lines Matching refs:new_nsp
63 struct nsproxy *new_nsp; in create_new_namespaces() local
66 new_nsp = create_nsproxy(); in create_new_namespaces()
67 if (!new_nsp) in create_new_namespaces()
70 new_nsp->mnt_ns = copy_mnt_ns(flags, tsk->nsproxy->mnt_ns, user_ns, new_fs); in create_new_namespaces()
71 if (IS_ERR(new_nsp->mnt_ns)) { in create_new_namespaces()
72 err = PTR_ERR(new_nsp->mnt_ns); in create_new_namespaces()
76 new_nsp->uts_ns = copy_utsname(flags, user_ns, tsk->nsproxy->uts_ns); in create_new_namespaces()
77 if (IS_ERR(new_nsp->uts_ns)) { in create_new_namespaces()
78 err = PTR_ERR(new_nsp->uts_ns); in create_new_namespaces()
82 new_nsp->ipc_ns = copy_ipcs(flags, user_ns, tsk->nsproxy->ipc_ns); in create_new_namespaces()
83 if (IS_ERR(new_nsp->ipc_ns)) { in create_new_namespaces()
84 err = PTR_ERR(new_nsp->ipc_ns); in create_new_namespaces()
88 new_nsp->pid_ns = copy_pid_ns(flags, user_ns, tsk->nsproxy->pid_ns); in create_new_namespaces()
89 if (IS_ERR(new_nsp->pid_ns)) { in create_new_namespaces()
90 err = PTR_ERR(new_nsp->pid_ns); in create_new_namespaces()
94 new_nsp->net_ns = copy_net_ns(flags, user_ns, tsk->nsproxy->net_ns); in create_new_namespaces()
95 if (IS_ERR(new_nsp->net_ns)) { in create_new_namespaces()
96 err = PTR_ERR(new_nsp->net_ns); in create_new_namespaces()
100 return new_nsp; in create_new_namespaces()
103 if (new_nsp->pid_ns) in create_new_namespaces()
104 put_pid_ns(new_nsp->pid_ns); in create_new_namespaces()
106 if (new_nsp->ipc_ns) in create_new_namespaces()
107 put_ipc_ns(new_nsp->ipc_ns); in create_new_namespaces()
109 if (new_nsp->uts_ns) in create_new_namespaces()
110 put_uts_ns(new_nsp->uts_ns); in create_new_namespaces()
112 if (new_nsp->mnt_ns) in create_new_namespaces()
113 put_mnt_ns(new_nsp->mnt_ns); in create_new_namespaces()
115 kmem_cache_free(nsproxy_cachep, new_nsp); in create_new_namespaces()
188 struct nsproxy **new_nsp, struct cred *new_cred, struct fs_struct *new_fs) in unshare_nsproxy_namespaces() argument
201 *new_nsp = create_new_namespaces(unshare_flags, current, user_ns, in unshare_nsproxy_namespaces()
203 if (IS_ERR(*new_nsp)) { in unshare_nsproxy_namespaces()
204 err = PTR_ERR(*new_nsp); in unshare_nsproxy_namespaces()