Lines Matching +full:smp +full:- +full:capable

1 // SPDX-License-Identifier: GPL-2.0
30 if (S_ISSOCK(inode->i_mode) && !(filp->f_mode & FMODE_PATH)) { in unix_get_socket()
32 struct sock *s = sock->sk; in unix_get_socket()
35 if (s && sock->ops && sock->ops->family == PF_UNIX) in unix_get_socket()
57 if (atomic_long_inc_return(&u->inflight) == 1) { in unix_inflight()
58 BUG_ON(!list_empty(&u->link)); in unix_inflight()
59 list_add_tail(&u->link, &gc_inflight_list); in unix_inflight()
61 BUG_ON(list_empty(&u->link)); in unix_inflight()
65 user->unix_inflight++; in unix_inflight()
78 BUG_ON(!atomic_long_read(&u->inflight)); in unix_notinflight()
79 BUG_ON(list_empty(&u->link)); in unix_notinflight()
81 if (atomic_long_dec_and_test(&u->inflight)) in unix_notinflight()
82 list_del_init(&u->link); in unix_notinflight()
83 unix_tot_inflight--; in unix_notinflight()
85 user->unix_inflight--; in unix_notinflight()
90 * The "user->unix_inflight" variable is protected by the garbage
99 if (unlikely(user->unix_inflight > task_rlimit(p, RLIMIT_NOFILE))) in too_many_unix_fds()
100 return !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN); in too_many_unix_fds()
109 return -ETOOMANYREFS; in unix_attach_fds()
116 UNIXCB(skb).fp = scm_fp_dup(scm->fp); in unix_attach_fds()
118 return -ENOMEM; in unix_attach_fds()
120 for (i = scm->fp->count - 1; i >= 0; i--) in unix_attach_fds()
121 unix_inflight(scm->fp->user, scm->fp->fp[i]); in unix_attach_fds()
130 scm->fp = UNIXCB(skb).fp; in unix_detach_fds()
133 for (i = scm->fp->count-1; i >= 0; i--) in unix_detach_fds()
134 unix_notinflight(scm->fp->user, scm->fp->fp[i]); in unix_detach_fds()
148 /* So fscking what? fput() had been SMP-safe since the last Summer */ in unix_destruct_scm()