• Home
  • Raw
  • Download

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()
66 user->unix_inflight++; in unix_inflight()
79 BUG_ON(!atomic_long_read(&u->inflight)); in unix_notinflight()
80 BUG_ON(list_empty(&u->link)); in unix_notinflight()
82 if (atomic_long_dec_and_test(&u->inflight)) in unix_notinflight()
83 list_del_init(&u->link); in unix_notinflight()
85 WRITE_ONCE(unix_tot_inflight, unix_tot_inflight - 1); in unix_notinflight()
87 user->unix_inflight--; in unix_notinflight()
92 * The "user->unix_inflight" variable is protected by the garbage
101 if (unlikely(user->unix_inflight > task_rlimit(p, RLIMIT_NOFILE))) in too_many_unix_fds()
102 return !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN); in too_many_unix_fds()
111 return -ETOOMANYREFS; in unix_attach_fds()
118 UNIXCB(skb).fp = scm_fp_dup(scm->fp); in unix_attach_fds()
120 return -ENOMEM; in unix_attach_fds()
122 for (i = scm->fp->count - 1; i >= 0; i--) in unix_attach_fds()
123 unix_inflight(scm->fp->user, scm->fp->fp[i]); in unix_attach_fds()
132 scm->fp = UNIXCB(skb).fp; in unix_detach_fds()
135 for (i = scm->fp->count-1; i >= 0; i--) in unix_detach_fds()
136 unix_notinflight(scm->fp->user, scm->fp->fp[i]); in unix_detach_fds()
150 /* So fscking what? fput() had been SMP-safe since the last Summer */ in unix_destruct_scm()