Home
last modified time | relevance | path

Searched refs:ucounts (Results 1 – 9 of 9) sorted by relevance

/kernel/
Ducount.c11 struct ucounts init_ucounts = {
134 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashe… in find_ucounts()
136 struct ucounts *ucounts; in find_ucounts() local
138 hlist_for_each_entry(ucounts, hashent, node) { in find_ucounts()
139 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts()
140 return ucounts; in find_ucounts()
145 static void hlist_add_ucounts(struct ucounts *ucounts) in hlist_add_ucounts() argument
147 struct hlist_head *hashent = ucounts_hashentry(ucounts->ns, ucounts->uid); in hlist_add_ucounts()
149 hlist_add_head(&ucounts->node, hashent); in hlist_add_ucounts()
153 struct ucounts *get_ucounts(struct ucounts *ucounts) in get_ucounts() argument
[all …]
Dutsname.c20 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces()
25 static void dec_uts_namespaces(struct ucounts *ucounts) in dec_uts_namespaces() argument
27 dec_ucount(ucounts, UCOUNT_UTS_NAMESPACES); in dec_uts_namespaces()
49 struct ucounts *ucounts; in clone_uts_ns() local
53 ucounts = inc_uts_namespaces(user_ns); in clone_uts_ns()
54 if (!ucounts) in clone_uts_ns()
66 ns->ucounts = ucounts; in clone_uts_ns()
78 dec_uts_namespaces(ucounts); in clone_uts_ns()
108 dec_uts_namespaces(ns->ucounts); in free_uts_ns()
Dpid_namespace.c61 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces()
66 static void dec_pid_namespaces(struct ucounts *ucounts) in dec_pid_namespaces() argument
68 dec_ucount(ucounts, UCOUNT_PID_NAMESPACES); in dec_pid_namespaces()
76 struct ucounts *ucounts; in create_pid_namespace() local
86 ucounts = inc_pid_namespaces(user_ns); in create_pid_namespace()
87 if (!ucounts) in create_pid_namespace()
110 ns->ucounts = ucounts; in create_pid_namespace()
119 dec_pid_namespaces(ucounts); in create_pid_namespace()
128 dec_pid_namespaces(ns->ucounts); in delayed_free_pidns()
Dcred.c65 .ucounts = &init_ucounts,
125 if (cred->ucounts) in put_cred_rcu()
126 put_ucounts(cred->ucounts); in put_cred_rcu()
290 new->ucounts = get_ucounts(new->ucounts); in prepare_creds()
291 if (!new->ucounts) in prepare_creds()
502 inc_rlimit_ucounts(new->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds()
507 dec_rlimit_ucounts(old->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds()
674 struct ucounts *new_ucounts, *old_ucounts = new->ucounts; in set_cred_ucounts()
686 new->ucounts = new_ucounts; in set_cred_ucounts()
755 new->ucounts = get_ucounts(new->ucounts); in prepare_kernel_cred()
[all …]
Duser_namespace.c32 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces()
37 static void dec_user_namespaces(struct ucounts *ucounts) in dec_user_namespaces() argument
39 return dec_ucount(ucounts, UCOUNT_USER_NAMESPACES); in dec_user_namespaces()
86 struct ucounts *ucounts; in create_user_ns() local
93 ucounts = inc_user_namespaces(parent_ns, owner); in create_user_ns()
94 if (!ucounts) in create_user_ns()
141 ns->ucounts = ucounts; in create_user_ns()
166 dec_user_namespaces(ucounts); in create_user_ns()
197 struct ucounts *ucounts = ns->ucounts; in free_user_ns() local
215 dec_user_namespaces(ucounts); in free_user_ns()
Dsignal.c418 struct ucounts *ucounts = NULL; in __sigqueue_alloc() local
430 ucounts = task_ucounts(t); in __sigqueue_alloc()
431 sigpending = inc_rlimit_get_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING); in __sigqueue_alloc()
443 dec_rlimit_put_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING); in __sigqueue_alloc()
447 q->ucounts = ucounts; in __sigqueue_alloc()
456 if (q->ucounts) { in __sigqueue_free()
457 dec_rlimit_put_ucounts(q->ucounts, UCOUNT_RLIMIT_SIGPENDING); in __sigqueue_free()
458 q->ucounts = NULL; in __sigqueue_free()
Dsys.c491 if (new->ucounts == current_ucounts()) in flag_nproc_exceeded()
501 if (is_ucounts_overlimit(new->ucounts, UCOUNT_RLIMIT_NPROC, rlimit(RLIMIT_NPROC)) && in flag_nproc_exceeded()
/kernel/cgroup/
Dnamespace.c12 static struct ucounts *inc_cgroup_namespaces(struct user_namespace *ns) in inc_cgroup_namespaces()
17 static void dec_cgroup_namespaces(struct ucounts *ucounts) in dec_cgroup_namespaces() argument
19 dec_ucount(ucounts, UCOUNT_CGROUP_NAMESPACES); in dec_cgroup_namespaces()
43 dec_cgroup_namespaces(ns->ucounts); in free_cgroup_ns()
55 struct ucounts *ucounts; in copy_cgroup_ns() local
69 ucounts = inc_cgroup_namespaces(user_ns); in copy_cgroup_ns()
70 if (!ucounts) in copy_cgroup_ns()
82 dec_cgroup_namespaces(ucounts); in copy_cgroup_ns()
87 new_ns->ucounts = ucounts; in copy_cgroup_ns()
/kernel/time/
Dnamespace.c59 static struct ucounts *inc_time_namespaces(struct user_namespace *ns) in inc_time_namespaces()
64 static void dec_time_namespaces(struct ucounts *ucounts) in dec_time_namespaces() argument
66 dec_ucount(ucounts, UCOUNT_TIME_NAMESPACES); in dec_time_namespaces()
82 struct ucounts *ucounts; in clone_time_ns() local
86 ucounts = inc_time_namespaces(user_ns); in clone_time_ns()
87 if (!ucounts) in clone_time_ns()
105 ns->ucounts = ucounts; in clone_time_ns()
117 dec_time_namespaces(ucounts); in clone_time_ns()
231 dec_time_namespaces(ns->ucounts); in free_time_ns()