Symbol: ucounts
fs/hugetlbfs/inode.c
1516
struct ucounts *ucounts = current_ucounts();
fs/hugetlbfs/inode.c
1518
if (user_shm_lock(size, ucounts)) {
fs/hugetlbfs/inode.c
1521
user_shm_unlock(size, ucounts);
fs/mount.h
20
struct ucounts *ucounts;
fs/namespace.c
4177
static struct ucounts *inc_mnt_namespaces(struct user_namespace *ns)
fs/namespace.c
4182
static void dec_mnt_namespaces(struct ucounts *ucounts)
fs/namespace.c
4184
dec_ucount(ucounts, UCOUNT_MNT_NAMESPACES);
fs/namespace.c
4191
dec_mnt_namespaces(ns->ucounts);
fs/namespace.c
4198
struct ucounts *ucounts;
fs/namespace.c
4201
ucounts = inc_mnt_namespaces(user_ns);
fs/namespace.c
4202
if (!ucounts)
fs/namespace.c
4207
dec_mnt_namespaces(ucounts);
fs/namespace.c
4217
dec_mnt_namespaces(ucounts);
fs/namespace.c
4227
new_ns->ucounts = ucounts;
fs/notify/fanotify/fanotify.c
1022
if (group->fanotify_data.ucounts)
fs/notify/fanotify/fanotify.c
1023
dec_ucount(group->fanotify_data.ucounts,
fs/notify/fanotify/fanotify.c
1107
dec_ucount(group->fanotify_data.ucounts, UCOUNT_FANOTIFY_MARKS);
fs/notify/fanotify/fanotify_user.c
1399
struct ucounts *ucounts = group->fanotify_data.ucounts;
fs/notify/fanotify/fanotify_user.c
1411
!inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_FANOTIFY_MARKS))
fs/notify/fanotify/fanotify_user.c
1444
dec_ucount(ucounts, UCOUNT_FANOTIFY_MARKS);
fs/notify/fanotify/fanotify_user.c
1672
group->fanotify_data.ucounts = inc_ucount(user_ns, current_euid(),
fs/notify/fanotify/fanotify_user.c
1674
if (!group->fanotify_data.ucounts)
fs/notify/inotify/inotify.h
55
static inline void dec_inotify_instances(struct ucounts *ucounts)
fs/notify/inotify/inotify.h
57
dec_ucount(ucounts, UCOUNT_INOTIFY_INSTANCES);
fs/notify/inotify/inotify.h
60
static inline struct ucounts *inc_inotify_watches(struct ucounts *ucounts)
fs/notify/inotify/inotify.h
62
return inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_INOTIFY_WATCHES);
fs/notify/inotify/inotify.h
65
static inline void dec_inotify_watches(struct ucounts *ucounts)
fs/notify/inotify/inotify.h
67
dec_ucount(ucounts, UCOUNT_INOTIFY_WATCHES);
fs/notify/inotify/inotify_fsnotify.c
183
if (group->inotify_data.ucounts)
fs/notify/inotify/inotify_fsnotify.c
184
dec_inotify_instances(group->inotify_data.ucounts);
fs/notify/inotify/inotify_user.c
533
dec_inotify_watches(group->inotify_data.ucounts);
fs/notify/inotify/inotify_user.c
613
if (!inc_inotify_watches(group->inotify_data.ucounts)) {
fs/notify/inotify/inotify_user.c
624
dec_inotify_watches(group->inotify_data.ucounts);
fs/notify/inotify/inotify_user.c
681
group->inotify_data.ucounts = inc_ucount(current_user_ns(),
fs/notify/inotify/inotify_user.c
685
if (!group->inotify_data.ucounts) {
fs/xfs/scrub/quotacheck.c
235
if (!xqc->ucounts)
fs/xfs/scrub/quotacheck.c
330
counts = xqc->ucounts;
fs/xfs/scrub/quotacheck.c
440
if (xqc->ucounts) {
fs/xfs/scrub/quotacheck.c
442
error = xqcheck_update_incore_counts(xqc, xqc->ucounts, id, 1,
fs/xfs/scrub/quotacheck.c
724
if (xqc->ucounts) {
fs/xfs/scrub/quotacheck.c
725
xfarray_destroy(xqc->ucounts);
fs/xfs/scrub/quotacheck.c
726
xqc->ucounts = NULL;
fs/xfs/scrub/quotacheck.c
759
sizeof(struct xqcheck_dquot), &xqc->ucounts);
fs/xfs/scrub/quotacheck.c
839
if (xqc->ucounts) {
fs/xfs/scrub/quotacheck.h
41
struct xfarray *ucounts;
fs/xfs/scrub/quotacheck.h
65
return xqc->ucounts;
fs/xfs/scrub/quotacheck_repair.c
225
if (xqc->ucounts) {
include/linux/cgroup_namespace.h
10
struct ucounts *ucounts;
include/linux/cred.h
144
struct ucounts *ucounts;
include/linux/cred.h
375
#define task_ucounts(task) (task_cred_xxx((task), ucounts))
include/linux/cred.h
392
#define current_ucounts() (current_cred_xxx(ucounts))
include/linux/fsnotify_backend.h
262
struct ucounts *ucounts;
include/linux/fsnotify_backend.h
274
struct ucounts *ucounts;
include/linux/ipc_namespace.h
76
struct ucounts *ucounts;
include/linux/mm.h
3099
extern int user_shm_lock(size_t, struct ucounts *);
include/linux/mm.h
3100
extern void user_shm_unlock(size_t, struct ucounts *);
include/linux/pid_namespace.h
46
struct ucounts *ucounts;
include/linux/shmem_fs.h
114
extern int shmem_lock(struct file *file, int lock, struct ucounts *ucounts);
include/linux/signal_types.h
16
struct ucounts;
include/linux/signal_types.h
26
struct ucounts *ucounts;
include/linux/time_namespace.h
26
struct ucounts *ucounts;
include/linux/user_namespace.h
110
struct ucounts *ucounts;
include/linux/user_namespace.h
130
extern struct ucounts init_ucounts;
include/linux/user_namespace.h
134
struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid, enum ucount_type type);
include/linux/user_namespace.h
135
void dec_ucount(struct ucounts *ucounts, enum ucount_type type);
include/linux/user_namespace.h
136
struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid);
include/linux/user_namespace.h
137
void put_ucounts(struct ucounts *ucounts);
include/linux/user_namespace.h
139
static inline struct ucounts * __must_check get_ucounts(struct ucounts *ucounts)
include/linux/user_namespace.h
141
if (rcuref_get(&ucounts->count))
include/linux/user_namespace.h
142
return ucounts;
include/linux/user_namespace.h
146
static inline long get_rlimit_value(struct ucounts *ucounts, enum rlimit_type type)
include/linux/user_namespace.h
148
return atomic_long_read(&ucounts->rlimit[type]);
include/linux/user_namespace.h
151
long inc_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v);
include/linux/user_namespace.h
152
bool dec_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v);
include/linux/user_namespace.h
153
long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type,
include/linux/user_namespace.h
155
void dec_rlimit_put_ucounts(struct ucounts *ucounts, enum rlimit_type type);
include/linux/user_namespace.h
156
bool is_rlimit_overlimit(struct ucounts *ucounts, enum rlimit_type type, unsigned long max);
include/linux/user_namespace.h
42
struct ucounts;
include/linux/uts_namespace.h
14
struct ucounts *ucounts;
include/net/net_namespace.h
94
struct ucounts *ucounts;
init/init_task.c
98
.ucounts = &init_ucounts,
ipc/mqueue.c
147
struct ucounts *ucounts; /* user who created, for accounting */
ipc/mqueue.c
321
info->ucounts = NULL; /* set when all is ok */
ipc/mqueue.c
371
info->ucounts = get_ucounts(current_ucounts());
ipc/mqueue.c
372
if (info->ucounts) {
ipc/mqueue.c
376
msgqueue = inc_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes);
ipc/mqueue.c
378
dec_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes);
ipc/mqueue.c
380
put_ucounts(info->ucounts);
ipc/mqueue.c
381
info->ucounts = NULL;
ipc/mqueue.c
537
if (info->ucounts) {
ipc/mqueue.c
549
dec_rlimit_ucounts(info->ucounts, UCOUNT_RLIMIT_MSGQUEUE, mq_bytes);
ipc/mqueue.c
559
put_ucounts(info->ucounts);
ipc/mqueue.c
560
info->ucounts = NULL;
ipc/namespace.c
106
dec_ipc_namespaces(ucounts);
ipc/namespace.c
164
dec_ipc_namespaces(ns->ucounts);
ipc/namespace.c
29
static struct ucounts *inc_ipc_namespaces(struct user_namespace *ns)
ipc/namespace.c
34
static void dec_ipc_namespaces(struct ucounts *ucounts)
ipc/namespace.c
36
dec_ucount(ucounts, UCOUNT_IPC_NAMESPACES);
ipc/namespace.c
43
struct ucounts *ucounts;
ipc/namespace.c
48
ucounts = inc_ipc_namespaces(user_ns);
ipc/namespace.c
49
if (!ucounts) {
ipc/namespace.c
71
ns->ucounts = ucounts;
ipc/shm.c
1213
struct ucounts *ucounts = current_ucounts();
ipc/shm.c
1215
err = shmem_lock(shm_file, 1, ucounts);
ipc/shm.c
1218
shp->mlock_ucounts = ucounts;
ipc/shm.c
65
struct ucounts *mlock_ucounts;
kernel/cgroup/namespace.c
12
static struct ucounts *inc_cgroup_namespaces(struct user_namespace *ns)
kernel/cgroup/namespace.c
17
static void dec_cgroup_namespaces(struct ucounts *ucounts)
kernel/cgroup/namespace.c
19
dec_ucount(ucounts, UCOUNT_CGROUP_NAMESPACES);
kernel/cgroup/namespace.c
40
dec_cgroup_namespaces(ns->ucounts);
kernel/cgroup/namespace.c
53
struct ucounts *ucounts;
kernel/cgroup/namespace.c
67
ucounts = inc_cgroup_namespaces(user_ns);
kernel/cgroup/namespace.c
68
if (!ucounts)
kernel/cgroup/namespace.c
80
dec_cgroup_namespaces(ucounts);
kernel/cgroup/namespace.c
85
new_ns->ucounts = ucounts;
kernel/cred.c
211
new->ucounts = get_ucounts(new->ucounts);
kernel/cred.c
212
if (!new->ucounts)
kernel/cred.c
414
inc_rlimit_ucounts(new->ucounts, UCOUNT_RLIMIT_NPROC, 1);
kernel/cred.c
419
dec_rlimit_ucounts(old->ucounts, UCOUNT_RLIMIT_NPROC, 1);
kernel/cred.c
515
struct ucounts *new_ucounts, *old_ucounts = new->ucounts;
kernel/cred.c
527
new->ucounts = new_ucounts;
kernel/cred.c
59
if (cred->ucounts)
kernel/cred.c
593
new->ucounts = get_ucounts(new->ucounts);
kernel/cred.c
594
if (!new->ucounts)
kernel/cred.c
60
put_ucounts(cred->ucounts);
kernel/pid_namespace.c
118
ns->ucounts = ucounts;
kernel/pid_namespace.c
135
dec_pid_namespaces(ucounts);
kernel/pid_namespace.c
144
dec_pid_namespaces(ns->ucounts);
kernel/pid_namespace.c
64
static struct ucounts *inc_pid_namespaces(struct user_namespace *ns)
kernel/pid_namespace.c
69
static void dec_pid_namespaces(struct ucounts *ucounts)
kernel/pid_namespace.c
71
dec_ucount(ucounts, UCOUNT_PID_NAMESPACES);
kernel/pid_namespace.c
81
struct ucounts *ucounts;
kernel/pid_namespace.c
91
ucounts = inc_pid_namespaces(user_ns);
kernel/pid_namespace.c
92
if (!ucounts)
kernel/signal.c
1941
struct ucounts *ucounts = sig_get_ucounts(current, -1, 0);
kernel/signal.c
1943
if (!ucounts)
kernel/signal.c
1946
__sigqueue_init(q, ucounts, SIGQUEUE_PREALLOC);
kernel/signal.c
402
static struct ucounts *sig_get_ucounts(struct task_struct *t, int sig,
kernel/signal.c
405
struct ucounts *ucounts;
kernel/signal.c
417
ucounts = task_ucounts(t);
kernel/signal.c
418
sigpending = inc_rlimit_get_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING,
kernel/signal.c
425
dec_rlimit_put_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING);
kernel/signal.c
430
return ucounts;
kernel/signal.c
433
static void __sigqueue_init(struct sigqueue *q, struct ucounts *ucounts,
kernel/signal.c
438
q->ucounts = ucounts;
kernel/signal.c
449
struct ucounts *ucounts = sig_get_ucounts(t, sig, override_rlimit);
kernel/signal.c
452
if (!ucounts)
kernel/signal.c
457
dec_rlimit_put_ucounts(ucounts, UCOUNT_RLIMIT_SIGPENDING);
kernel/signal.c
461
__sigqueue_init(q, ucounts, 0);
kernel/signal.c
471
if (q->ucounts) {
kernel/signal.c
472
dec_rlimit_put_ucounts(q->ucounts, UCOUNT_RLIMIT_SIGPENDING);
kernel/signal.c
473
q->ucounts = NULL;
kernel/sys.c
538
if (new->ucounts == current_ucounts())
kernel/sys.c
548
if (is_rlimit_overlimit(new->ucounts, UCOUNT_RLIMIT_NPROC, rlimit(RLIMIT_NPROC)) &&
kernel/time/namespace.c
106
ns->ucounts = ucounts;
kernel/time/namespace.c
118
dec_time_namespaces(ucounts);
kernel/time/namespace.c
148
dec_time_namespaces(ns->ucounts);
kernel/time/namespace.c
62
static struct ucounts *inc_time_namespaces(struct user_namespace *ns)
kernel/time/namespace.c
67
static void dec_time_namespaces(struct ucounts *ucounts)
kernel/time/namespace.c
69
dec_ucount(ucounts, UCOUNT_TIME_NAMESPACES);
kernel/time/namespace.c
85
struct ucounts *ucounts;
kernel/time/namespace.c
89
ucounts = inc_time_namespaces(user_ns);
kernel/time/namespace.c
90
if (!ucounts)
kernel/time/posix-timers.c
445
if (tmr->sigq.ucounts)
kernel/time/posix-timers.c
446
dec_rlimit_put_ucounts(tmr->sigq.ucounts, UCOUNT_RLIMIT_SIGPENDING);
kernel/ucount.c
11
struct ucounts init_ucounts = {
kernel/ucount.c
132
static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid,
kernel/ucount.c
135
struct ucounts *ucounts;
kernel/ucount.c
139
hlist_nulls_for_each_entry_rcu(ucounts, pos, hashent, node) {
kernel/ucount.c
140
if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) {
kernel/ucount.c
141
if (rcuref_get(&ucounts->count))
kernel/ucount.c
142
return ucounts;
kernel/ucount.c
148
static void hlist_add_ucounts(struct ucounts *ucounts)
kernel/ucount.c
150
struct hlist_nulls_head *hashent = ucounts_hashentry(ucounts->ns, ucounts->uid);
kernel/ucount.c
153
hlist_nulls_add_head_rcu(&ucounts->node, hashent);
kernel/ucount.c
157
struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid)
kernel/ucount.c
160
struct ucounts *ucounts, *new;
kernel/ucount.c
162
ucounts = find_ucounts(ns, uid, hashent);
kernel/ucount.c
163
if (ucounts)
kernel/ucount.c
164
return ucounts;
kernel/ucount.c
175
ucounts = find_ucounts(ns, uid, hashent);
kernel/ucount.c
176
if (ucounts) {
kernel/ucount.c
179
return ucounts;
kernel/ucount.c
188
void put_ucounts(struct ucounts *ucounts)
kernel/ucount.c
192
if (rcuref_put(&ucounts->count)) {
kernel/ucount.c
194
hlist_nulls_del_rcu(&ucounts->node);
kernel/ucount.c
197
put_user_ns(ucounts->ns);
kernel/ucount.c
198
kfree_rcu(ucounts, rcu);
kernel/ucount.c
214
struct ucounts *inc_ucount(struct user_namespace *ns, kuid_t uid,
kernel/ucount.c
217
struct ucounts *ucounts, *iter, *bad;
kernel/ucount.c
219
ucounts = alloc_ucounts(ns, uid);
kernel/ucount.c
220
for (iter = ucounts; iter; iter = tns->ucounts) {
kernel/ucount.c
227
return ucounts;
kernel/ucount.c
230
for (iter = ucounts; iter != bad; iter = iter->ns->ucounts)
kernel/ucount.c
233
put_ucounts(ucounts);
kernel/ucount.c
237
void dec_ucount(struct ucounts *ucounts, enum ucount_type type)
kernel/ucount.c
239
struct ucounts *iter;
kernel/ucount.c
240
for (iter = ucounts; iter; iter = iter->ns->ucounts) {
kernel/ucount.c
244
put_ucounts(ucounts);
kernel/ucount.c
247
long inc_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v)
kernel/ucount.c
249
struct ucounts *iter;
kernel/ucount.c
253
for (iter = ucounts; iter; iter = iter->ns->ucounts) {
kernel/ucount.c
257
else if (iter == ucounts)
kernel/ucount.c
264
bool dec_rlimit_ucounts(struct ucounts *ucounts, enum rlimit_type type, long v)
kernel/ucount.c
266
struct ucounts *iter;
kernel/ucount.c
268
for (iter = ucounts; iter; iter = iter->ns->ucounts) {
kernel/ucount.c
271
if (iter == ucounts)
kernel/ucount.c
277
static void do_dec_rlimit_put_ucounts(struct ucounts *ucounts,
kernel/ucount.c
278
struct ucounts *last, enum rlimit_type type)
kernel/ucount.c
280
struct ucounts *iter, *next;
kernel/ucount.c
281
for (iter = ucounts; iter != last; iter = next) {
kernel/ucount.c
284
next = iter->ns->ucounts;
kernel/ucount.c
290
void dec_rlimit_put_ucounts(struct ucounts *ucounts, enum rlimit_type type)
kernel/ucount.c
292
do_dec_rlimit_put_ucounts(ucounts, NULL, type);
kernel/ucount.c
295
long inc_rlimit_get_ucounts(struct ucounts *ucounts, enum rlimit_type type,
kernel/ucount.c
299
struct ucounts *iter;
kernel/ucount.c
303
for (iter = ucounts; iter; iter = iter->ns->ucounts) {
kernel/ucount.c
307
if (iter == ucounts)
kernel/ucount.c
324
do_dec_rlimit_put_ucounts(ucounts, iter, type);
kernel/ucount.c
328
bool is_rlimit_overlimit(struct ucounts *ucounts, enum rlimit_type type, unsigned long rlimit)
kernel/ucount.c
330
struct ucounts *iter;
kernel/ucount.c
334
for (iter = ucounts; iter; iter = iter->ns->ucounts) {
kernel/user_namespace.c
146
ns->ucounts = ucounts;
kernel/user_namespace.c
172
dec_user_namespaces(ucounts);
kernel/user_namespace.c
203
struct ucounts *ucounts = ns->ucounts;
kernel/user_namespace.c
226
dec_user_namespaces(ucounts);
kernel/user_namespace.c
34
static struct ucounts *inc_user_namespaces(struct user_namespace *ns, kuid_t uid)
kernel/user_namespace.c
39
static void dec_user_namespaces(struct ucounts *ucounts)
kernel/user_namespace.c
41
return dec_ucount(ucounts, UCOUNT_USER_NAMESPACES);
kernel/user_namespace.c
88
struct ucounts *ucounts;
kernel/user_namespace.c
95
ucounts = inc_user_namespaces(parent_ns, owner);
kernel/user_namespace.c
96
if (!ucounts)
kernel/utsname.c
21
static struct ucounts *inc_uts_namespaces(struct user_namespace *ns)
kernel/utsname.c
26
static void dec_uts_namespaces(struct ucounts *ucounts)
kernel/utsname.c
28
dec_ucount(ucounts, UCOUNT_UTS_NAMESPACES);
kernel/utsname.c
40
struct ucounts *ucounts;
kernel/utsname.c
44
ucounts = inc_uts_namespaces(user_ns);
kernel/utsname.c
45
if (!ucounts)
kernel/utsname.c
57
ns->ucounts = ucounts;
kernel/utsname.c
68
dec_uts_namespaces(ucounts);
kernel/utsname.c
99
dec_uts_namespaces(ns->ucounts);
mm/mlock.c
797
int user_shm_lock(size_t size, struct ucounts *ucounts)
mm/mlock.c
808
memlock = inc_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked);
mm/mlock.c
811
dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked);
mm/mlock.c
814
if (!get_ucounts(ucounts)) {
mm/mlock.c
815
dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked);
mm/mlock.c
825
void user_shm_unlock(size_t size, struct ucounts *ucounts)
mm/mlock.c
828
dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, (size + PAGE_SIZE - 1) >> PAGE_SHIFT);
mm/mlock.c
830
put_ucounts(ucounts);
mm/shmem.c
2876
int shmem_lock(struct file *file, int lock, struct ucounts *ucounts)
mm/shmem.c
2888
if (!user_shm_lock(inode->i_size, ucounts))
mm/shmem.c
2893
if (!lock && (info->flags & SHMEM_F_LOCKED) && ucounts) {
mm/shmem.c
2894
user_shm_unlock(inode->i_size, ucounts);
mm/shmem.c
5733
int shmem_lock(struct file *file, int lock, struct ucounts *ucounts)
net/core/net_namespace.c
468
static struct ucounts *inc_net_namespaces(struct user_namespace *ns)
net/core/net_namespace.c
473
static void dec_net_namespaces(struct ucounts *ucounts)
net/core/net_namespace.c
475
dec_ucount(ucounts, UCOUNT_NET_NAMESPACES);
net/core/net_namespace.c
552
struct ucounts *ucounts;
net/core/net_namespace.c
559
ucounts = inc_net_namespaces(user_ns);
net/core/net_namespace.c
560
if (!ucounts)
net/core/net_namespace.c
572
net->ucounts = ucounts;
net/core/net_namespace.c
592
dec_net_namespaces(ucounts);
net/core/net_namespace.c
717
dec_net_namespaces(net->ucounts);
security/keys/process_keys.c
922
if (unlikely(!get_ucounts(old->ucounts))) {
security/keys/process_keys.c
937
new->ucounts = old->ucounts;