func: static int unix_dgram_connect(struct socket *sock, struct sockaddr int alen, int flags) struct sock * sk = sock -> sk ; struct sockaddr_un * sunaddr = ( struct sockaddr_un * ) addr ; int err ; if ( addr -> sa_family != AF_UNSPEC )  err = unix_mkname ( sunaddr , alen , & hash ); static int unix_mkname(struct sockaddr_un *sunaddr, int len, unsigned int *hashp) if ( len <= sizeof ( short ) || len > sizeof ( * sunaddr ) )  return - EINVAL ; if ( ! sunaddr || sunaddr -> sun_family != AF_UNIX )  return - EINVAL ; if ( sunaddr -> sun_path [ 0 ] )  ( ( char * ) sunaddr ) [ len ] = 0; len = strlen ( sunaddr -> sun_path ) + 1 + sizeof ( short ); return len ; return len ; if ( err < 0 )  if ( test_bit ( SOCK_PASSCRED , & sock -> flags ) && ! unix_sk ( sk ) -> addr && ( err = unix_autobind ( sock ) ) != 0 )  static int unix_autobind(struct socket *sock) struct sock * sk = sock -> sk ; struct net * net = sock_net ( sk ) ; struct unix_sock * u = unix_sk ( sk ) ; static u32 ordernum = 1 ; struct unix_address * addr ; int err ; unsigned int retries = 0 ; err = mutex_lock_interruptible ( & u -> readlock ); if ( err )  if ( u -> addr )  addr = kzalloc ( sizeof ( * addr ) + sizeof ( short ) + 16 , GFP_KERNEL ); if ( ! addr )  addr -> name -> sun_family = AF_UNIX; addr -> len = sprintf ( addr -> name -> sun_path + 1 , "%05x" , ordernum ) + 1 + sizeof ( short ); addr -> hash = unix_hash_fold ( csum_partial ( addr -> name , addr -> len , 0 ) ); static inline unsigned int unix_hash_fold(__wsum n) unsigned int hash = ( __force unsigned int ) csum_fold ( n ) hash ^= hash >> 8; return hash & ( UNIX_HASH_SIZE - 1 ) ; ordernum = ( ordernum + 1 ) & 0xFFFFF; if ( __unix_find_socket_byname ( net , addr -> name , addr -> len , sock -> type , addr -> hash ) )  if ( retries ++ == 0xFFFFF )  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 ) )  