Lines Matching +full:access +full:- +full:ns
1 /* SPDX-License-Identifier: GPL-2.0 */
17 * A structure to contain pointers to all per-process
18 * namespaces - fs (mount), uts, network, sysvipc, etc.
20 * The pid namespace is an exception -- it's accessed using
47 struct cgroup_namespace *: &(__ns->ns), \
48 struct ipc_namespace *: &(__ns->ns), \
49 struct net *: &(__ns->ns), \
50 struct pid_namespace *: &(__ns->ns), \
51 struct mnt_namespace *: &(__ns->ns), \
52 struct time_namespace *: &(__ns->ns), \
53 struct user_namespace *: &(__ns->ns), \
54 struct uts_namespace *: &(__ns->ns))
74 if (set->flags & CLONE_NEWUSER) in nsset_cred()
75 return (struct cred *)set->cred; in nsset_cred()
81 * the namespaces access rules are:
83 * 1. only current task is allowed to change tsk->nsproxy pointer or
85 * when changing tsk->nsproxy.
87 * 2. when accessing (i.e. reading) current task's namespaces - no
88 * precautions should be taken - just dereference the pointers
90 * 3. the access to other task namespaces is performed like this
92 * nsproxy = task->nsproxy;
99 * * NULL task->nsproxy means that this task is
110 void free_nsproxy(struct nsproxy *ns);
115 static inline void put_nsproxy(struct nsproxy *ns) in put_nsproxy() argument
117 if (refcount_dec_and_test(&ns->count)) in put_nsproxy()
118 free_nsproxy(ns); in put_nsproxy()
121 static inline void get_nsproxy(struct nsproxy *ns) in get_nsproxy() argument
123 refcount_inc(&ns->count); in get_nsproxy()