func: static int unix_stream_connect(struct socket *sock, struct sockaddr int addr_len, int flags) struct sockaddr_un * sunaddr = ( struct sockaddr_un * ) uaddr ; struct sock * sk = sock -> sk ; struct net * net = sock_net ( sk ) ; struct unix_sock * u = unix_sk ( sk ) , * newu , * otheru ; unsigned int hash ; int st ; int err ; long timeo ; err = unix_mkname ( sunaddr , addr_len , & hash ); if ( err < 0 )  addr_len = err; if ( test_bit ( SOCK_PASSCRED , & sock -> flags ) && ! u -> addr && ( err = unix_autobind ( sock ) ) != 0 )  timeo = sock_sndtimeo ( sk , flags & O_NONBLOCK ); err = - ENOMEM; newsk = unix_create1 ( sock_net ( sk ) , NULL , 0 ); static struct sock *unix_create1(struct net *net, struct socket *sock, int kern) struct sock * sk = NULL ; if ( atomic_long_read ( & unix_nr_socks ) > 2 * get_max_files ( ) )  sk = sk_alloc ( net , PF_UNIX , GFP_KERNEL , & unix_proto , kern ); if ( ! sk )  sk -> sk_write_space = unix_write_space; sk -> sk_max_ack_backlog = net -> unx . sysctl_max_dgram_qlen; sk -> sk_destruct = unix_sock_destructor; return sk ; if ( newsk == NULL )  skb = sock_wmalloc ( newsk , 1 , 0 , GFP_KERNEL ); if ( skb == NULL )  other = unix_find_other ( net , sunaddr , addr_len , sk -> sk_type , hash , & err ); if ( ! other )  if ( sock_flag ( other , SOCK_DEAD ) )  if ( other -> sk_state != TCP_LISTEN )  if ( other -> sk_shutdown & RCV_SHUTDOWN )  if ( unix_recvq_full ( other ) )  static inline int unix_recvq_full(struct sock const *sk) return skb_queue_len ( & sk -> sk_receive_queue ) > sk -> sk_max_ack_backlog ; if ( ! timeo )  timeo = unix_wait_for_peer ( other , timeo ); static long unix_wait_for_peer(struct sock *other, long timeo) int sched ; sched = ! sock_flag ( other , SOCK_DEAD ) && ! ( other -> sk_shutdown & RCV_SHUTDOWN ) && unix_recvq_full ( other ); static inline int unix_recvq_full(struct sock const *sk) return skb_queue_len ( & sk -> sk_receive_queue ) > sk -> sk_max_ack_backlog ; if ( sched )  timeo = schedule_timeout ( timeo ); return timeo ; if ( signal_pending ( current ) )  st = sk -> sk_state; switch ( st )  if ( sk -> sk_state != st )  static struct sock *unix_find_other(struct net struct sockaddr_un *sunname, int int type, unsigned int hash, int *error) struct sock * u ; if ( sunname -> sun_path [ 0 ] )  u = unix_find_socket_byname ( net , sunname , len , type , hash ); static inline struct sock *unix_find_socket_byname(struct net struct sockaddr_un int len, int unsigned int hash) struct sock * s ; s = __unix_find_socket_byname ( net , sunname , len , type , hash ); static struct sock *__unix_find_socket_byname(struct net struct sockaddr_un int len, int type, unsigned int hash) struct sock * s ; struct unix_sock * u = unix_sk ( s ) ; if ( u -> addr -> len == len && ! memcmp ( u -> addr -> name , sunname , len ) )  