summaryrefslogtreecommitdiff
path: root/net/handshake
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-05-11 11:47:09 -0400
committerDavid S. Miller <davem@davemloft.net>2023-05-12 09:24:07 +0100
commitb16d76fe9a27d337c16972a71d959bcf0c96c2e6 (patch)
tree92421c61460589007bd89f7571b3f75e6244aa60 /net/handshake
parent0fae8847563b0c990f8cffcb8d3668fbcaca4919 (diff)
downloadlinux-next-b16d76fe9a27d337c16972a71d959bcf0c96c2e6.tar.gz
net/handshake: Remove unneeded check from handshake_dup()
handshake_req_submit() now verifies that the socket has a file. Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/handshake')
-rw-r--r--net/handshake/netlink.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c
index 35c9c445e0b8..7ec8a76c3c8a 100644
--- a/net/handshake/netlink.c
+++ b/net/handshake/netlink.c
@@ -99,9 +99,6 @@ static int handshake_dup(struct socket *sock)
struct file *file;
int newfd;
- if (!sock->file)
- return -EBADF;
-
file = get_file(sock->file);
newfd = get_unused_fd_flags(O_CLOEXEC);
if (newfd < 0) {