Home
last modified time | relevance | path

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

/Linux-v4.19/kernel/
Ducount.c121 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashe… in find_ucounts()
123 struct ucounts *ucounts; in find_ucounts() local
125 hlist_for_each_entry(ucounts, hashent, node) { in find_ucounts()
126 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts()
127 return ucounts; in find_ucounts()
132 static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid) in get_ucounts()
135 struct ucounts *ucounts, *new; in get_ucounts() local
138 ucounts = find_ucounts(ns, uid, hashent); in get_ucounts()
139 if (!ucounts) { in get_ucounts()
151 ucounts = find_ucounts(ns, uid, hashent); in get_ucounts()
[all …]
Dutsname.c24 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces()
29 static void dec_uts_namespaces(struct ucounts *ucounts) in dec_uts_namespaces() argument
31 dec_ucount(ucounts, UCOUNT_UTS_NAMESPACES); in dec_uts_namespaces()
53 struct ucounts *ucounts; in clone_uts_ns() local
57 ucounts = inc_uts_namespaces(user_ns); in clone_uts_ns()
58 if (!ucounts) in clone_uts_ns()
70 ns->ucounts = ucounts; in clone_uts_ns()
82 dec_uts_namespaces(ucounts); in clone_uts_ns()
115 dec_uts_namespaces(ns->ucounts); in free_uts_ns()
Dpid_namespace.c67 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces()
72 static void dec_pid_namespaces(struct ucounts *ucounts) in dec_pid_namespaces() argument
74 dec_ucount(ucounts, UCOUNT_PID_NAMESPACES); in dec_pid_namespaces()
82 struct ucounts *ucounts; in create_pid_namespace() local
92 ucounts = inc_pid_namespaces(user_ns); in create_pid_namespace()
93 if (!ucounts) in create_pid_namespace()
116 ns->ucounts = ucounts; in create_pid_namespace()
126 dec_pid_namespaces(ucounts); in create_pid_namespace()
135 dec_pid_namespaces(ns->ucounts); in delayed_free_pidns()
Duser_namespace.c37 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces()
42 static void dec_user_namespaces(struct ucounts *ucounts) in dec_user_namespaces() argument
44 return dec_ucount(ucounts, UCOUNT_USER_NAMESPACES); in dec_user_namespaces()
79 struct ucounts *ucounts; in create_user_ns() local
86 ucounts = inc_user_namespaces(parent_ns, owner); in create_user_ns()
87 if (!ucounts) in create_user_ns()
129 ns->ucounts = ucounts; in create_user_ns()
153 dec_user_namespaces(ucounts); in create_user_ns()
184 struct ucounts *ucounts = ns->ucounts; in free_user_ns() local
204 dec_user_namespaces(ucounts); in free_user_ns()
/Linux-v4.19/fs/notify/inotify/
Dinotify.h36 static inline void dec_inotify_instances(struct ucounts *ucounts) in dec_inotify_instances() argument
38 dec_ucount(ucounts, UCOUNT_INOTIFY_INSTANCES); in dec_inotify_instances()
41 static inline struct ucounts *inc_inotify_watches(struct ucounts *ucounts) in inc_inotify_watches() argument
43 return inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_INOTIFY_WATCHES); in inc_inotify_watches()
46 static inline void dec_inotify_watches(struct ucounts *ucounts) in dec_inotify_watches() argument
48 dec_ucount(ucounts, UCOUNT_INOTIFY_WATCHES); in dec_inotify_watches()
Dinotify_fsnotify.c181 if (group->inotify_data.ucounts) in inotify_free_group_priv()
182 dec_inotify_instances(group->inotify_data.ucounts); in inotify_free_group_priv()
Dinotify_user.c502 dec_inotify_watches(group->inotify_data.ucounts); in inotify_ignored_and_remove_idr()
582 if (!inc_inotify_watches(group->inotify_data.ucounts)) { in inotify_new_watch()
647 group->inotify_data.ucounts = inc_ucount(current_user_ns(), in inotify_new_group()
651 if (!group->inotify_data.ucounts) { in inotify_new_group()
/Linux-v4.19/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()
/Linux-v4.19/ipc/
Dnamespace.c22 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces()
27 static void dec_ipc_namespaces(struct ucounts *ucounts) in dec_ipc_namespaces() argument
29 dec_ucount(ucounts, UCOUNT_IPC_NAMESPACES); in dec_ipc_namespaces()
36 struct ucounts *ucounts; in create_ipc_ns() local
40 ucounts = inc_ipc_namespaces(user_ns); in create_ipc_ns()
41 if (!ucounts) in create_ipc_ns()
56 ns->ucounts = ucounts; in create_ipc_ns()
74 dec_ipc_namespaces(ucounts); in create_ipc_ns()
124 dec_ipc_namespaces(ns->ucounts); in free_ipc_ns()
/Linux-v4.19/include/linux/
Duser_namespace.h38 struct ucounts;
77 struct ucounts *ucounts; member
81 struct ucounts { struct
93 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type); argument
94 void dec_ucount(struct ucounts *ucounts, enum ucount_type type);
Dutsname.h28 struct ucounts *ucounts; member
Dpid_namespace.h42 struct ucounts *ucounts; member
Dipc_namespace.h68 struct ucounts *ucounts; member
Dfsnotify_backend.h184 struct ucounts *ucounts; member
Dcgroup.h833 struct ucounts *ucounts; member
/Linux-v4.19/net/core/
Dnet_namespace.c362 static struct ucounts *inc_net_namespaces(struct user_namespace *ns) in inc_net_namespaces()
367 static void dec_net_namespaces(struct ucounts *ucounts) in dec_net_namespaces() argument
369 dec_ucount(ucounts, UCOUNT_NET_NAMESPACES); in dec_net_namespaces()
413 struct ucounts *ucounts; in copy_net_ns() local
420 ucounts = inc_net_namespaces(user_ns); in copy_net_ns()
421 if (!ucounts) in copy_net_ns()
430 net->ucounts = ucounts; in copy_net_ns()
446 dec_net_namespaces(ucounts); in copy_net_ns()
567 dec_net_namespaces(net->ucounts); in cleanup_net()
/Linux-v4.19/fs/
Dmount.h14 struct ucounts *ucounts; member
Dnamespace.c2794 static struct ucounts *inc_mnt_namespaces(struct user_namespace *ns) in inc_mnt_namespaces()
2799 static void dec_mnt_namespaces(struct ucounts *ucounts) in dec_mnt_namespaces() argument
2801 dec_ucount(ucounts, UCOUNT_MNT_NAMESPACES); in dec_mnt_namespaces()
2807 dec_mnt_namespaces(ns->ucounts); in free_mnt_ns()
2824 struct ucounts *ucounts; in alloc_mnt_ns() local
2827 ucounts = inc_mnt_namespaces(user_ns); in alloc_mnt_ns()
2828 if (!ucounts) in alloc_mnt_ns()
2833 dec_mnt_namespaces(ucounts); in alloc_mnt_ns()
2839 dec_mnt_namespaces(ucounts); in alloc_mnt_ns()
2850 new_ns->ucounts = ucounts; in alloc_mnt_ns()
/Linux-v4.19/include/net/
Dnet_namespace.h72 struct ucounts *ucounts; member