• Kuniyuki Iwashima's avatar
    af_unix: Pass struct sock to unix_autobind(). · f7ed31f4
    Kuniyuki Iwashima authored
    We do not use struct socket in unix_autobind() and pass struct sock to
    unix_bind_bsd() and unix_bind_abstract().  Let's pass it to unix_autobind()
    as well.
    
    Also, this patch fixes these errors by checkpatch.pl.
    
      ERROR: do not use assignment in if condition
      #1795: FILE: net/unix/af_unix.c:1795:
      +	if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr
    
      CHECK: Logical continuations should be on the previous line
      #1796: FILE: net/unix/af_unix.c:1796:
      +	if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr
      +	    && (err = unix_autobind(sock)) != 0)
    Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.co.jp>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    f7ed31f4
af_unix.c 80 KB