| /linux/kernel/ |
| H A D | ucount.c | 11 struct ucounts init_ucounts = { 132 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, in find_ucounts() 135 struct ucounts *ucounts; in find_ucounts() local 139 hlist_nulls_for_each_entry_rcu(ucounts, pos, hashent, node) { in find_ucounts() 140 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) { in find_ucounts() 141 if (rcuref_get(&ucounts->count)) in find_ucounts() 142 return ucounts; in find_ucounts() 148 static void hlist_add_ucounts(struct ucounts *ucounts) in hlist_add_ucounts() argument 150 struct hlist_nulls_head *hashent = ucounts_hashentry(ucounts->ns, ucounts->uid); in hlist_add_ucounts() 153 hlist_nulls_add_head_rcu(&ucounts->node, hashent); in hlist_add_ucounts() [all …]
|
| H A D | utsname.c | 21 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() 99 dec_uts_namespaces(ns->ucounts); in free_uts_ns()
|
| H A D | pid_namespace.c | 64 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 D | cred.c | 59 if (cred->ucounts) in put_cred_rcu() 60 put_ucounts(cred->ucounts); in put_cred_rcu() 211 new->ucounts = get_ucounts(new->ucounts); in prepare_creds() 212 if (!new->ucounts) in prepare_creds() 413 inc_rlimit_ucounts(new->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds() 418 dec_rlimit_ucounts(old->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds() 514 struct ucounts *new_ucounts, *old_ucounts = new->ucounts; in set_cred_ucounts() 526 new->ucounts = new_ucounts; in set_cred_ucounts() 592 new->ucounts = get_ucounts(new->ucounts); in prepare_kernel_cred() 593 if (!new->ucounts) in prepare_kernel_cred()
|
| H A D | user_namespace.c | 34 static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid) in inc_user_namespaces() 39 static void dec_user_namespaces(struct ucounts *ucounts) in dec_user_namespaces() argument 41 return dec_ucount(ucounts, UCOUNT_USER_NAMESPACES); in dec_user_namespaces() 88 struct ucounts *ucounts; in create_user_ns() local 95 ucounts = inc_user_namespaces(parent_ns, owner); in create_user_ns() 96 if (!ucounts) in create_user_ns() 146 ns->ucounts = ucounts; in create_user_ns() 172 dec_user_namespaces(ucounts); in create_user_ns() 203 struct ucounts *ucounts = ns->ucounts; in free_user_ns() local 226 dec_user_namespaces(ucounts); in free_user_ns()
|
| /linux/include/linux/ |
| H A D | user_namespace.h | 42 struct ucounts; 110 struct ucounts *ucounts; member 119 struct ucounts { struct 130 extern struct ucounts init_ucounts; argument 134 struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type); 135 void dec_ucount(struct ucounts *ucounts, enum ucount_type type); 136 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid); 137 void put_ucounts(struct ucounts *ucounts); 139 static inline struct ucounts * __must_check get_ucounts(struct ucounts *ucounts) in get_ucounts() argument 141 if (rcuref_get(&ucounts->count)) in get_ucounts() [all …]
|
| H A D | signal_types.h | 16 struct ucounts; 26 struct ucounts *ucounts; member
|
| H A D | cgroup_namespace.h | 10 struct ucounts *ucounts; member
|
| H A D | uts_namespace.h | 14 struct ucounts *ucounts; member
|
| H A D | cred.h | 142 struct ucounts *ucounts; member 372 #define task_ucounts(task) (task_cred_xxx((task), ucounts)) 389 #define current_ucounts() (current_cred_xxx(ucounts))
|
| H A D | pid_namespace.h | 39 struct ucounts *ucounts; member
|
| H A D | ipc_namespace.h | 76 struct ucounts *ucounts; member
|
| H A D | time_namespace.h | 25 struct ucounts *ucounts; member
|
| H A D | shmem_fs.h | 115 extern int shmem_lock(struct file *file, int lock, struct ucounts *ucounts);
|
| H A D | fsnotify_backend.h | 262 struct ucounts *ucounts; member 274 struct ucounts *ucounts; member
|
| /linux/fs/notify/inotify/ |
| H A D | inotify.h | 55 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 D | inotify_fsnotify.c | 183 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 D | namespace.c | 12 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 67 ucounts = inc_cgroup_namespaces(user_ns); in copy_cgroup_ns() 68 if (!ucounts) in copy_cgroup_ns() 80 dec_cgroup_namespaces(ucounts); in copy_cgroup_ns() 85 new_ns->ucounts = ucounts; in copy_cgroup_ns()
|
| /linux/ipc/ |
| H A D | namespace.c | 29 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() 71 ns->ucounts = ucounts; in create_ipc_ns() 106 dec_ipc_namespaces(ucounts); in create_ipc_ns() 164 dec_ipc_namespaces(ns->ucounts); in free_ipc_ns()
|
| H A D | mqueue.c | 148 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() 377 msgqueue = inc_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes); 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() 538 if (info->ucounts) { in mqueue_evict_inode() 550 dec_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes); in mqueue_evict_inode() [all …]
|
| /linux/kernel/time/ |
| H A D | namespace.c | 60 static struct ucounts *inc_time_namespaces(struct user_namespace *ns) in inc_time_namespaces() 65 static void dec_time_namespaces(struct ucounts *ucounts) in dec_time_namespaces() argument 67 dec_ucount(ucounts, UCOUNT_TIME_NAMESPACES); in dec_time_namespaces() 83 struct ucounts *ucounts; in clone_time_ns() local 87 ucounts = inc_time_namespaces(user_ns); in clone_time_ns() 88 if (!ucounts) in clone_time_ns() 104 ns->ucounts = ucounts; in clone_time_ns() 116 dec_time_namespaces(ucounts); in clone_time_ns() 256 dec_time_namespaces(ns->ucounts); in free_time_ns()
|
| /linux/mm/ |
| H A D | mlock.c | 791 int user_shm_lock(size_t size, struct ucounts *ucounts) in user_shm_lock() argument 802 memlock = inc_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock() 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_unlock() argument 822 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, (size + PAGE_SIZE - 1) >> PAGE_SHIFT); in user_shm_unlock() 824 put_ucounts(ucounts); in user_shm_unlock()
|
| /linux/fs/xfs/scrub/ |
| H A D | quotacheck.h | 41 struct xfarray *ucounts; member 65 return xqc->ucounts; in xqcheck_counters_for()
|
| /linux/net/core/ |
| H A D | net_namespace.c | 468 static struct ucounts *inc_net_namespaces(struct user_namespace *ns) in inc_net_namespaces() 473 static void dec_net_namespaces(struct ucounts *ucounts) in dec_net_namespaces() 475 dec_ucount(ucounts, UCOUNT_NET_NAMESPACES); in dec_net_namespaces() 554 struct ucounts *ucounts; in copy_net_ns() 561 ucounts = inc_net_namespaces(user_ns); in copy_net_ns() 562 if (!ucounts) in copy_net_ns() 574 net->ucounts = ucounts; in copy_net_ns() 472 dec_net_namespaces(struct ucounts * ucounts) dec_net_namespaces() argument 553 struct ucounts *ucounts; copy_net_ns() local [all...] |
| /linux/fs/ |
| H A D | mount.h | 19 struct ucounts *ucounts; member
|