]> git.baikalelectronics.ru Git - kernel.git/commit
make sock_alloc_file() do sock_release() on failures
authorAl Viro <viro@ZenIV.linux.org.uk>
Tue, 5 Dec 2017 23:29:09 +0000 (23:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Dec 2017 23:39:29 +0000 (18:39 -0500)
commit96e8323684f5548ac7fee85b688fdea6a3342f7a
treee96c21ce49a9bb3225e8334f87a64dcd14162a75
parentc2967fd4dfc094af63f7ba2e35f87be2b6cfe803
make sock_alloc_file() do sock_release() on failures

This changes calling conventions (and simplifies the hell out
the callers).  New rules: once struct socket had been passed
to sock_alloc_file(), it's been consumed either by struct file
or by sock_release() done by sock_alloc_file().  Either way
the caller should not do sock_release() after that point.

Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/staging/lustre/lnet/lnet/lib-socket.c
net/9p/trans_fd.c
net/kcm/kcmsock.c
net/sctp/socket.c
net/socket.c