Lines Matching refs:u
290 struct unix_sock *u = unix_sk(s); in __unix_find_socket_byname() local
295 if (u->addr->len == len && in __unix_find_socket_byname()
296 !memcmp(u->addr->name, sunname, len)) in __unix_find_socket_byname()
367 struct unix_sock *u; in unix_dgram_peer_wake_relay() local
370 u = container_of(q, struct unix_sock, peer_wake); in unix_dgram_peer_wake_relay()
372 __remove_wait_queue(&unix_sk(u->peer_wake.private)->peer_wait, in unix_dgram_peer_wake_relay()
374 u->peer_wake.private = NULL; in unix_dgram_peer_wake_relay()
377 u_sleep = sk_sleep(&u->sk); in unix_dgram_peer_wake_relay()
386 struct unix_sock *u, *u_other; in unix_dgram_peer_wake_connect() local
389 u = unix_sk(sk); in unix_dgram_peer_wake_connect()
394 if (!u->peer_wake.private) { in unix_dgram_peer_wake_connect()
395 u->peer_wake.private = other; in unix_dgram_peer_wake_connect()
396 __add_wait_queue(&u_other->peer_wait, &u->peer_wake); in unix_dgram_peer_wake_connect()
408 struct unix_sock *u, *u_other; in unix_dgram_peer_wake_disconnect() local
410 u = unix_sk(sk); in unix_dgram_peer_wake_disconnect()
414 if (u->peer_wake.private == other) { in unix_dgram_peer_wake_disconnect()
415 __remove_wait_queue(&u_other->peer_wait, &u->peer_wake); in unix_dgram_peer_wake_disconnect()
416 u->peer_wake.private = NULL; in unix_dgram_peer_wake_disconnect()
495 struct unix_sock *u = unix_sk(sk); in unix_sock_destructor() local
507 if (u->addr) in unix_sock_destructor()
508 unix_release_addr(u->addr); in unix_sock_destructor()
522 struct unix_sock *u = unix_sk(sk); in unix_release_sock() local
534 path = u->path; in unix_release_sock()
535 u->path.dentry = NULL; in unix_release_sock()
536 u->path.mnt = NULL; in unix_release_sock()
545 wake_up_interruptible_all(&u->peer_wait); in unix_release_sock()
639 struct unix_sock *u = unix_sk(sk); in unix_listen() local
646 if (!u->addr) in unix_listen()
652 wake_up_interruptible_all(&u->peer_wait); in unix_listen()
695 struct unix_sock *u = unix_sk(sk); in unix_set_peek_off() local
697 if (mutex_lock_interruptible(&u->iolock)) in unix_set_peek_off()
701 mutex_unlock(&u->iolock); in unix_set_peek_off()
791 struct unix_sock *u; in unix_create1() local
808 u = unix_sk(sk); in unix_create1()
809 u->path.dentry = NULL; in unix_create1()
810 u->path.mnt = NULL; in unix_create1()
811 spin_lock_init(&u->lock); in unix_create1()
812 atomic_long_set(&u->inflight, 0); in unix_create1()
813 INIT_LIST_HEAD(&u->link); in unix_create1()
814 mutex_init(&u->iolock); /* single task reading lock */ in unix_create1()
815 mutex_init(&u->bindlock); /* single task binding lock */ in unix_create1()
816 init_waitqueue_head(&u->peer_wait); in unix_create1()
817 init_waitqueue_func_entry(&u->peer_wake, unix_dgram_peer_wake_relay); in unix_create1()
878 struct unix_sock *u = unix_sk(sk); in unix_autobind() local
884 err = mutex_lock_interruptible(&u->bindlock); in unix_autobind()
889 if (u->addr) in unix_autobind()
926 smp_store_release(&u->addr, addr); in unix_autobind()
931 out: mutex_unlock(&u->bindlock); in unix_autobind()
939 struct sock *u; in unix_find_other() local
956 u = unix_find_socket_byinode(inode); in unix_find_other()
957 if (!u) in unix_find_other()
960 if (u->sk_type == type) in unix_find_other()
966 if (u->sk_type != type) { in unix_find_other()
967 sock_put(u); in unix_find_other()
972 u = unix_find_socket_byname(net, sunname, len, type, hash); in unix_find_other()
973 if (u) { in unix_find_other()
975 dentry = unix_sk(u)->path.dentry; in unix_find_other()
977 touch_atime(&unix_sk(u)->path); in unix_find_other()
981 return u; in unix_find_other()
1023 struct unix_sock *u = unix_sk(sk); in unix_bind() local
1058 err = mutex_lock_interruptible(&u->bindlock); in unix_bind()
1063 if (u->addr) in unix_bind()
1080 u->path = path; in unix_bind()
1096 smp_store_release(&u->addr, addr); in unix_bind()
1102 mutex_unlock(&u->bindlock); in unix_bind()
1217 struct unix_sock *u = unix_sk(other); in unix_wait_for_peer() local
1221 prepare_to_wait_exclusive(&u->peer_wait, &wait, TASK_INTERRUPTIBLE); in unix_wait_for_peer()
1232 finish_wait(&u->peer_wait, &wait); in unix_wait_for_peer()
1242 struct unix_sock *u = unix_sk(sk), *newu, *otheru; in unix_stream_connect() local
1256 if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr && in unix_stream_connect()
1639 const struct unix_skb_parms *u = &UNIXCB(skb); in unix_skb_scm_eq() local
1641 return u->pid == scm->pid && in unix_skb_scm_eq()
1642 uid_eq(u->uid, scm->creds.uid) && in unix_skb_scm_eq()
1643 gid_eq(u->gid, scm->creds.gid) && in unix_skb_scm_eq()
1656 struct unix_sock *u = unix_sk(sk); in unix_dgram_sendmsg() local
1691 if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr in unix_dgram_sendmsg()
2126 struct unix_sock *u = unix_sk(sk); in unix_dgram_recvmsg() local
2136 err = mutex_lock_interruptible(&u->iolock); in unix_dgram_recvmsg()
2158 wake_up_interruptible_sync_poll(&u->peer_wait, in unix_dgram_recvmsg()
2212 mutex_unlock(&u->iolock); in unix_dgram_recvmsg()
2282 struct unix_sock *u = unix_sk(sk); in unix_stream_read_generic() local
2312 mutex_lock(&u->iolock); in unix_stream_read_generic()
2353 mutex_unlock(&u->iolock); in unix_stream_read_generic()
2364 mutex_lock(&u->iolock); in unix_stream_read_generic()
2467 mutex_unlock(&u->iolock); in unix_stream_read_generic()
2506 struct unix_sock *u = unix_sk(sk); in skb_unix_socket_splice() local
2508 mutex_unlock(&u->iolock); in skb_unix_socket_splice()
2510 mutex_lock(&u->iolock); in skb_unix_socket_splice()
2826 struct unix_sock *u = unix_sk(s); in unix_seq_show() local
2840 if (u->addr) { // under unix_table_lock here in unix_seq_show()
2845 len = u->addr->len - sizeof(short); in unix_seq_show()
2853 seq_putc(seq, u->addr->name->sun_path[i]); in unix_seq_show()