• Home
  • Raw
  • Download

Lines Matching refs:u

269 		struct unix_sock *u = unix_sk(s);  in __unix_find_socket_byname()  local
274 if (u->addr->len == len && in __unix_find_socket_byname()
275 !memcmp(u->addr->name, sunname, len)) in __unix_find_socket_byname()
346 struct unix_sock *u; in unix_dgram_peer_wake_relay() local
349 u = container_of(q, struct unix_sock, peer_wake); in unix_dgram_peer_wake_relay()
351 __remove_wait_queue(&unix_sk(u->peer_wake.private)->peer_wait, in unix_dgram_peer_wake_relay()
353 u->peer_wake.private = NULL; in unix_dgram_peer_wake_relay()
356 u_sleep = sk_sleep(&u->sk); in unix_dgram_peer_wake_relay()
365 struct unix_sock *u, *u_other; in unix_dgram_peer_wake_connect() local
368 u = unix_sk(sk); in unix_dgram_peer_wake_connect()
373 if (!u->peer_wake.private) { in unix_dgram_peer_wake_connect()
374 u->peer_wake.private = other; in unix_dgram_peer_wake_connect()
375 __add_wait_queue(&u_other->peer_wait, &u->peer_wake); in unix_dgram_peer_wake_connect()
387 struct unix_sock *u, *u_other; in unix_dgram_peer_wake_disconnect() local
389 u = unix_sk(sk); in unix_dgram_peer_wake_disconnect()
393 if (u->peer_wake.private == other) { in unix_dgram_peer_wake_disconnect()
394 __remove_wait_queue(&u_other->peer_wait, &u->peer_wake); in unix_dgram_peer_wake_disconnect()
395 u->peer_wake.private = NULL; in unix_dgram_peer_wake_disconnect()
473 struct unix_sock *u = unix_sk(sk); in unix_sock_destructor() local
485 if (u->addr) in unix_sock_destructor()
486 unix_release_addr(u->addr); in unix_sock_destructor()
500 struct unix_sock *u = unix_sk(sk); in unix_release_sock() local
512 path = u->path; in unix_release_sock()
513 u->path.dentry = NULL; in unix_release_sock()
514 u->path.mnt = NULL; in unix_release_sock()
519 wake_up_interruptible_all(&u->peer_wait); in unix_release_sock()
593 struct unix_sock *u = unix_sk(sk); in unix_listen() local
600 if (!u->addr) in unix_listen()
606 wake_up_interruptible_all(&u->peer_wait); in unix_listen()
649 struct unix_sock *u = unix_sk(sk); in unix_set_peek_off() local
651 mutex_lock(&u->readlock); in unix_set_peek_off()
653 mutex_unlock(&u->readlock); in unix_set_peek_off()
740 struct unix_sock *u; in unix_create1() local
757 u = unix_sk(sk); in unix_create1()
758 u->path.dentry = NULL; in unix_create1()
759 u->path.mnt = NULL; in unix_create1()
760 spin_lock_init(&u->lock); in unix_create1()
761 atomic_long_set(&u->inflight, 0); in unix_create1()
762 INIT_LIST_HEAD(&u->link); in unix_create1()
763 mutex_init(&u->readlock); /* single task reading lock */ in unix_create1()
764 init_waitqueue_head(&u->peer_wait); in unix_create1()
765 init_waitqueue_func_entry(&u->peer_wake, unix_dgram_peer_wake_relay); in unix_create1()
826 struct unix_sock *u = unix_sk(sk); in unix_autobind() local
832 mutex_lock(&u->readlock); in unix_autobind()
835 if (u->addr) in unix_autobind()
872 u->addr = addr; in unix_autobind()
877 out: mutex_unlock(&u->readlock); in unix_autobind()
885 struct sock *u; in unix_find_other() local
902 u = unix_find_socket_byinode(inode); in unix_find_other()
903 if (!u) in unix_find_other()
906 if (u->sk_type == type) in unix_find_other()
912 if (u->sk_type != type) { in unix_find_other()
913 sock_put(u); in unix_find_other()
918 u = unix_find_socket_byname(net, sunname, len, type, hash); in unix_find_other()
919 if (u) { in unix_find_other()
921 dentry = unix_sk(u)->path.dentry; in unix_find_other()
923 touch_atime(&unix_sk(u)->path); in unix_find_other()
927 return u; in unix_find_other()
969 struct unix_sock *u = unix_sk(sk); in unix_bind() local
991 mutex_lock(&u->readlock); in unix_bind()
994 if (u->addr) in unix_bind()
1021 u->path = path; in unix_bind()
1037 u->addr = addr; in unix_bind()
1043 mutex_unlock(&u->readlock); in unix_bind()
1151 struct unix_sock *u = unix_sk(other); in unix_wait_for_peer() local
1155 prepare_to_wait_exclusive(&u->peer_wait, &wait, TASK_INTERRUPTIBLE); in unix_wait_for_peer()
1166 finish_wait(&u->peer_wait, &wait); in unix_wait_for_peer()
1176 struct unix_sock *u = unix_sk(sk), *newu, *otheru; in unix_stream_connect() local
1190 if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr && in unix_stream_connect()
1412 struct unix_sock *u; in unix_getname() local
1427 u = unix_sk(sk); in unix_getname()
1429 if (!u->addr) { in unix_getname()
1434 struct unix_address *addr = u->addr; in unix_getname()
1549 struct unix_sock *u = unix_sk(sk); in unix_dgram_sendmsg() local
1586 if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr in unix_dgram_sendmsg()
1901 struct unix_sock *u = unix_sk(sk); in unix_copy_addr() local
1904 if (u->addr) { in unix_copy_addr()
1905 msg->msg_namelen = u->addr->len; in unix_copy_addr()
1906 memcpy(msg->msg_name, u->addr->name, u->addr->len); in unix_copy_addr()
1917 struct unix_sock *u = unix_sk(sk); in unix_dgram_recvmsg() local
1929 err = mutex_lock_interruptible(&u->readlock); in unix_dgram_recvmsg()
1948 wake_up_interruptible_sync_poll(&u->peer_wait, in unix_dgram_recvmsg()
2004 mutex_unlock(&u->readlock); in unix_dgram_recvmsg()
2052 struct unix_sock *u = unix_sk(sk); in unix_stream_recvmsg() local
2083 err = mutex_lock_interruptible(&u->readlock); in unix_stream_recvmsg()
2119 mutex_unlock(&u->readlock); in unix_stream_recvmsg()
2124 || mutex_lock_interruptible(&u->readlock)) { in unix_stream_recvmsg()
2202 mutex_unlock(&u->readlock); in unix_stream_recvmsg()
2487 struct unix_sock *u = unix_sk(s); in unix_seq_show() local
2501 if (u->addr) { in unix_seq_show()
2506 len = u->addr->len - sizeof(short); in unix_seq_show()
2514 seq_putc(seq, u->addr->name->sun_path[i]); in unix_seq_show()