Home
last modified time | relevance | path

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

12

/linux/include/linux/
H A Duser_namespace.h42 struct ucounts;
113 struct ucounts *ucounts; member
122 struct ucounts { struct
133 extern struct ucounts init_ucounts; argument
137 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
138 void dec_ucount(struct ucounts *ucounts, enum ucount_type type);
139 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid);
140 void put_ucounts(struct ucounts *ucounts);
142 static inline struct ucounts * __must_check get_ucounts(struct ucounts *ucounts) in get_ucounts() argument
144 if (rcuref_get(&ucounts->count)) in get_ucounts()
[all …]
H A Dsignal_types.h16 struct ucounts;
26 struct ucounts *ucounts; member
H A Dcgroup_namespace.h10 struct ucounts *ucounts; member
H A Duts_namespace.h14 struct ucounts *ucounts; member
H A Dipc_namespace.h76 struct ucounts *ucounts; member
H A Dshmem_fs.h118 extern int shmem_lock(struct file *file, int lock, struct ucounts *ucounts); in shmem_mapping()
H A Dfsnotify_backend.h262 struct ucounts *ucounts; member
274 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()
H A Dinotify_user.c533 dec_inotify_watches(group->inotify_data.ucounts); in inotify_ignored_and_remove_idr()
600 if (!inc_inotify_watches(group->inotify_data.ucounts)) { in inotify_new_watch()
611 dec_inotify_watches(group->inotify_data.ucounts); in inotify_new_watch()
668 group->inotify_data.ucounts = inc_ucount(current_user_ns(), in inotify_new_group()
672 if (!group->inotify_data.ucounts) { in inotify_new_group()
/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()
40 dec_cgroup_namespaces(ns->ucounts); in free_cgroup_ns()
53 struct ucounts *ucounts; in copy_cgroup_ns() local
65 ucounts = inc_cgroup_namespaces(user_ns); in copy_cgroup_ns()
66 if (!ucounts) in copy_cgroup_ns()
78 dec_cgroup_namespaces(ucounts); in copy_cgroup_ns()
[all...]
/linux/kernel/
H A Dutsname.c21 static struct ucounts *inc_uts_namespaces(struct user_namespace *ns) in inc_uts_namespaces()
26 static void dec_uts_namespaces(struct ucounts *ucounts) in dec_uts_namespaces() argument
28 dec_ucount(ucounts, UCOUNT_UTS_NAMESPACES); in dec_uts_namespaces()
40 struct ucounts *ucounts; in clone_uts_ns() local
44 ucounts = inc_uts_namespaces(user_ns); in clone_uts_ns()
45 if (!ucounts) in clone_uts_ns()
57 ns->ucounts = ucounts; in clone_uts_ns()
68 dec_uts_namespaces(ucounts); in clone_uts_ns()
98 dec_uts_namespaces(ns->ucounts); in free_uts_ns()
H A Dpid_namespace.c64 static struct ucounts *inc_pid_namespaces(struct user_namespace *ns) in inc_pid_namespaces()
69 static void dec_pid_namespaces(struct ucounts *ucounts) in dec_pid_namespaces() argument
71 dec_ucount(ucounts, UCOUNT_PID_NAMESPACES); in dec_pid_namespaces()
81 struct ucounts *ucounts; in create_pid_namespace() local
91 ucounts = inc_pid_namespaces(user_ns); in create_pid_namespace()
92 if (!ucounts) in create_pid_namespace()
118 ns->ucounts = ucounts; in create_pid_namespace()
135 dec_pid_namespaces(ucounts); in create_pid_namespace()
144 dec_pid_namespaces(ns->ucounts); in delayed_free_pidns()
H A Duser_namespace.c35 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces()
40 static void dec_user_namespaces(struct ucounts *ucounts) in dec_user_namespaces() argument
42 return dec_ucount(ucounts, UCOUNT_USER_NAMESPACES); in dec_user_namespaces()
92 struct ucounts *ucounts; in create_user_ns()
99 ucounts = inc_user_namespaces(parent_ns, owner); in create_user_ns()
100 if (!ucounts) in create_user_ns()
150 ns->ucounts = ucounts; in create_user_ns()
89 struct ucounts *ucounts; create_user_ns() local
201 struct ucounts *ucounts = ns->ucounts; free_user_ns() local
[all...]
H A Dsignal.c384 static struct ucounts *sig_get_ucounts(struct task_struct *t, int sig, in sig_get_ucounts()
387 struct ucounts *ucounts; in sig_get_ucounts() local
399 ucounts = task_ucounts(t); in sig_get_ucounts()
400 sigpending = inc_rlimit_get_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING, in sig_get_ucounts()
407 dec_rlimit_put_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING); in sig_get_ucounts()
412 return ucounts; in sig_get_ucounts()
415 static void __sigqueue_init(struct sigqueue *q, struct ucounts *ucounts, in __sigqueue_init() argument
420 q->ucounts in __sigqueue_init()
431 struct ucounts *ucounts = sig_get_ucounts(t, sig, override_rlimit); sigqueue_alloc() local
1989 struct ucounts *ucounts = sig_get_ucounts(current, -1, 0); posixtimer_init_sigqueue() local
[all...]
/linux/ipc/
H A Dnamespace.c29 static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns) in inc_ipc_namespaces()
34 static void dec_ipc_namespaces(struct ucounts *ucounts) in dec_ipc_namespaces() argument
36 dec_ucount(ucounts, UCOUNT_IPC_NAMESPACES); in dec_ipc_namespaces()
43 struct ucounts *ucounts; in create_ipc_ns() local
48 ucounts = inc_ipc_namespaces(user_ns); in create_ipc_ns()
49 if (!ucounts) { in create_ipc_ns()
70 ns->ucounts = ucounts; in create_ipc_ns()
[all...]
H A Dmqueue.c147 struct ucounts *ucounts; /* user who created, for accounting */ member
321 info->ucounts = NULL; /* set when all is ok */ in mqueue_get_inode()
371 info->ucounts = get_ucounts(current_ucounts()); in mqueue_get_inode()
372 if (info->ucounts) { in mqueue_get_inode()
376 msgqueue = inc_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes); in mqueue_get_inode()
378 dec_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes); in mqueue_get_inode()
380 put_ucounts(info->ucounts); in mqueue_get_inode()
381 info->ucounts = NULL; in mqueue_get_inode()
544 if (info->ucounts) { in mqueue_evict_inode()
556 dec_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes); in mqueue_evict_inode()
[all …]
/linux/mm/
H A Dmlock.c791 int user_shm_lock(size_t size, struct ucounts *ucounts) in SYSCALL_DEFINE0()
802 memlock = inc_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked);
805 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock()
808 if (!get_ucounts(ucounts)) { in user_shm_lock()
809 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock()
819 void user_shm_unlock(size_t size, struct ucounts *ucounts) in user_shm_lock()
822 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, (size + PAGE_SIZE - 1) >> PAGE_SHIFT); in user_shm_lock()
824 put_ucounts(ucounts); in user_shm_lock()
804 user_shm_lock(size_t size,struct ucounts * ucounts) user_shm_lock() argument
832 user_shm_unlock(size_t size,struct ucounts * ucounts) user_shm_unlock() argument
[all...]
/linux/fs/xfs/scrub/
H A Dquotacheck.c235 if (!xqc->ucounts) in xqcheck_mod_live_ino_dqtrx()
332 counts = xqc->ucounts; in xqcheck_apply_live_dqtrx()
442 if (xqc->ucounts) { in xqcheck_collect_inode()
444 error = xqcheck_update_incore_counts(xqc, xqc->ucounts, id, 1, in xqcheck_collect_inode()
726 if (xqc->ucounts) { in xqcheck_teardown_scan()
727 xfarray_destroy(xqc->ucounts); in xqcheck_teardown_scan()
728 xqc->ucounts = NULL; in xqcheck_teardown_scan()
761 sizeof(struct xqcheck_dquot), &xqc->ucounts); in xqcheck_setup_scan()
841 if (xqc->ucounts) { in xchk_quotacheck()
H A Dquotacheck.h41 struct xfarray *ucounts; member
65 return xqc->ucounts; in xqcheck_counters_for()
/linux/net/core/
H A Dnet_namespace.c472 static struct ucounts *inc_net_namespaces(struct user_namespace *ns) in dec_net_namespaces()
477 static void dec_net_namespaces(struct ucounts *ucounts)
479 dec_ucount(ucounts, UCOUNT_NET_NAMESPACES); in net_alloc()
560 struct ucounts *ucounts; in copy_net_ns()
567 ucounts = inc_net_namespaces(user_ns); in copy_net_ns()
568 if (!ucounts) in copy_net_ns()
578 net->ucounts = ucounts; in copy_net_ns()
470 dec_net_namespaces(struct ucounts * ucounts) dec_net_namespaces() argument
553 struct ucounts *ucounts; copy_net_ns() local
[all...]
/linux/fs/
H A Dbinfmt_misc.c299 dec_ucount(interp->ucounts, UCOUNT_BINFMT_MISC_INTERPRETERS); in entry_put_interpreters()
327 struct ucounts *ucounts; in entry_attach_interpreter() local
335 ucounts = inc_ucount(current_user_ns(), current_euid(), in entry_attach_interpreter()
337 if (!ucounts) in entry_attach_interpreter()
344 dec_ucount(ucounts, UCOUNT_BINFMT_MISC_INTERPRETERS); in entry_attach_interpreter()
352 interp->ucounts = ucounts; in entry_attach_interpreter()
H A Dmount.h22 struct ucounts *ucounts; member
/linux/fs/notify/fanotify/
H A Dfanotify_user.c1406 struct ucounts *ucounts = group->fanotify_data.ucounts; in fanotify_add_new_mark() local
1418 !inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_FANOTIFY_MARKS)) in fanotify_add_new_mark()
1451 dec_ucount(ucounts, UCOUNT_FANOTIFY_MARKS); in fanotify_add_new_mark()
1679 group->fanotify_data.ucounts = inc_ucount(user_ns, current_euid(), in SYSCALL_DEFINE2()
1681 if (!group->fanotify_data.ucounts) in SYSCALL_DEFINE2()
/linux/include/net/
H A Dnet_namespace.h98 struct ucounts *ucounts;
94 struct ucounts *ucounts; global() member

12