Home
last modified time | relevance | path

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

12

/linux/kernel/
H A Ducount.c132 struct ucounts *ucounts; in find_ucounts() local
135 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts()
141 static void hlist_add_ucounts(struct ucounts *ucounts) in hlist_add_ucounts() argument
155 struct ucounts *get_ucounts(struct ucounts *ucounts) in get_ucounts() argument
167 struct ucounts *ucounts, *new; in alloc_ucounts() local
203 void put_ucounts(struct ucounts *ucounts) in put_ucounts() argument
232 struct ucounts *ucounts, *iter, *bad; in inc_ucount() local
235 for (iter = ucounts; iter; iter = tns->ucounts) { in inc_ucount()
255 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in dec_ucount()
268 for (iter = ucounts; iter; iter = iter->ns->ucounts) { in inc_rlimit_ucounts()
[all …]
H A 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()
H A Dpid_namespace.c63 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces()
68 static void dec_pid_namespaces(struct ucounts *ucounts) in dec_pid_namespaces() argument
70 dec_ucount(ucounts, UCOUNT_PID_NAMESPACES); in dec_pid_namespaces()
78 struct ucounts *ucounts; in create_pid_namespace() local
88 ucounts = inc_pid_namespaces(user_ns); in create_pid_namespace()
89 if (!ucounts) in create_pid_namespace()
112 ns->ucounts = ucounts; in create_pid_namespace()
[all...]
H A Dcred.c62 .ucounts = &init_ucounts,
86 if (cred->ucounts) in put_cred_rcu()
87 put_ucounts(cred->ucounts); in put_cred_rcu()
238 new->ucounts = get_ucounts(new->ucounts); in prepare_creds()
239 if (!new->ucounts) in prepare_creds()
437 inc_rlimit_ucounts(new->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds()
441 dec_rlimit_ucounts(old->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds()
585 struct ucounts *new_ucounts, *old_ucounts = new->ucounts; in set_cred_ucounts()
597 new->ucounts = new_ucounts; in set_cred_ucounts()
663 new->ucounts = get_ucounts(new->ucounts); in prepare_kernel_cred()
[all …]
H A Duser_namespace.c33 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces()
38 static void dec_user_namespaces(struct ucounts *ucounts) in dec_user_namespaces() argument
40 return dec_ucount(ucounts, UCOUNT_USER_NAMESPACES); in dec_user_namespaces()
87 struct ucounts *ucounts; in create_user_ns() local
94 ucounts = inc_user_namespaces(parent_ns, owner); in create_user_ns()
95 if (!ucounts) in create_user_ns()
146 ns->ucounts = ucounts; in create_user_ns()
171 dec_user_namespaces(ucounts); in create_user_ns()
202 struct ucounts *ucounts = ns->ucounts; in free_user_ns() local
223 dec_user_namespaces(ucounts); in free_user_ns()
/linux/include/linux/
H A Duser_namespace.h38 struct ucounts;
106 struct ucounts *ucounts; member
115 struct ucounts { struct
130 void dec_ucount(struct ucounts *ucounts, enum ucount_type type);
132 struct ucounts * __must_check get_ucounts(struct ucounts *ucounts);
133 void put_ucounts(struct ucounts *ucounts);
135 static inline long get_rlimit_value(struct ucounts *ucounts, enum rlimit_type type) in get_rlimit_value() argument
140 long inc_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v);
141 bool dec_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v);
142 long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type);
[all …]
H A Dsignal_types.h16 struct ucounts;
26 struct ucounts *ucounts; member
H A Dcred.h140 struct ucounts *ucounts; member
365 #define task_ucounts(task) (task_cred_xxx((task), ucounts))
382 #define current_ucounts() (current_cred_xxx(ucounts))
H A Dutsname.h27 struct ucounts *ucounts; member
H A Dpid_namespace.h38 struct ucounts *ucounts; member
H A Dipc_namespace.h76 struct ucounts *ucounts; member
H A Dtime_namespace.h24 struct ucounts *ucounts; member
H A Dshmem_fs.h98 extern int shmem_lock(struct file *file, int lock, struct ucounts *ucounts);
H A Dfsnotify_backend.h245 struct ucounts *ucounts; member
257 struct ucounts *ucounts; member
/linux/fs/notify/inotify/
H A Dinotify.h55 static inline void dec_inotify_instances(struct ucounts *ucounts) in dec_inotify_instances() argument
57 dec_ucount(ucounts, UCOUNT_INOTIFY_INSTANCES); in dec_inotify_instances()
60 static inline struct ucounts *inc_inotify_watches(struct ucounts *ucounts) in inc_inotify_watches() argument
62 return inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_INOTIFY_WATCHES); in inc_inotify_watches()
65 static inline void dec_inotify_watches(struct ucounts *ucounts) in dec_inotify_watches() argument
67 dec_ucount(ucounts, UCOUNT_INOTIFY_WATCHES); in dec_inotify_watches()
H A Dinotify_fsnotify.c183 if (group->inotify_data.ucounts) in inotify_free_group_priv()
184 dec_inotify_instances(group->inotify_data.ucounts); in inotify_free_group_priv()
/linux/kernel/cgroup/
H A 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/ipc/
H A Dnamespace.c28 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces()
33 static void dec_ipc_namespaces(struct ucounts *ucounts) in dec_ipc_namespaces() argument
35 dec_ucount(ucounts, UCOUNT_IPC_NAMESPACES); in dec_ipc_namespaces()
42 struct ucounts *ucounts; in create_ipc_ns() local
47 ucounts = inc_ipc_namespaces(user_ns); in create_ipc_ns()
48 if (!ucounts) { in create_ipc_ns()
71 ns->ucounts = ucounts; in create_ipc_ns()
102 dec_ipc_namespaces(ucounts); in create_ipc_ns()
160 dec_ipc_namespaces(ns->ucounts); in free_ipc_ns()
H A Dmqueue.c148 struct ucounts *ucounts; /* user who created, for accounting */ member
322 info->ucounts = NULL; /* set when all is ok */ in mqueue_get_inode()
372 info->ucounts = get_ucounts(current_ucounts()); in mqueue_get_inode()
373 if (info->ucounts) { in mqueue_get_inode()
379 dec_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes); in mqueue_get_inode()
381 put_ucounts(info->ucounts); in mqueue_get_inode()
382 info->ucounts = NULL; in mqueue_get_inode()
537 if (info->ucounts) { in mqueue_evict_inode()
549 dec_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes); in mqueue_evict_inode()
559 put_ucounts(info->ucounts); in mqueue_evict_inode()
[all …]
/linux/kernel/time/
H A 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()
249 dec_time_namespaces(ns->ucounts); in free_time_ns()
/linux/mm/
H A Dmlock.c799 int user_shm_lock(size_t size, struct ucounts *ucounts) in user_shm_lock() argument
810 memlock = inc_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock()
813 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock()
816 if (!get_ucounts(ucounts)) { in user_shm_lock()
817 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock()
827 void user_shm_unlock(size_t size, struct ucounts *ucounts) in user_shm_unlock() argument
830 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, (size + PAGE_SIZE - 1) >> PAGE_SHIFT); in user_shm_unlock()
832 put_ucounts(ucounts); in user_shm_unlock()
/linux/fs/xfs/scrub/
H A Dquotacheck.h41 struct xfarray *ucounts; member
65 return xqc->ucounts; in xqcheck_counters_for()
H A Dquotacheck.c235 if (!xqc->ucounts) in xqcheck_mod_live_ino_dqtrx()
330 counts = xqc->ucounts; in xqcheck_apply_live_dqtrx()
437 if (xqc->ucounts) { in xqcheck_collect_inode()
439 error = xqcheck_update_incore_counts(xqc, xqc->ucounts, id, 1, in xqcheck_collect_inode()
724 if (xqc->ucounts) { in xqcheck_teardown_scan()
725 xfarray_destroy(xqc->ucounts); in xqcheck_teardown_scan()
726 xqc->ucounts = NULL; in xqcheck_teardown_scan()
761 sizeof(struct xqcheck_dquot), &xqc->ucounts); in xqcheck_setup_scan()
846 if (xqc->ucounts) { in xchk_quotacheck()
/linux/net/core/
H A Dnet_namespace.c412 static struct ucounts *inc_net_namespaces(struct user_namespace *ns) in inc_net_namespaces()
417 static void dec_net_namespaces(struct ucounts *ucounts) in dec_net_namespaces() argument
419 dec_ucount(ucounts, UCOUNT_NET_NAMESPACES); in dec_net_namespaces()
482 struct ucounts *ucounts; in copy_net_ns() local
489 ucounts = inc_net_namespaces(user_ns); in copy_net_ns()
490 if (!ucounts) in copy_net_ns()
501 net->ucounts = ucounts; in copy_net_ns()
520 dec_net_namespaces(ucounts); in copy_net_ns()
656 dec_net_namespaces(net->ucounts); in cleanup_net()
/linux/fs/
H A Dmount.h13 struct ucounts *ucounts; member

12