summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-05-11 11:47:09 -0400
committerJakub Kicinski <kuba@kernel.org>2023-05-24 22:05:23 -0700
commita095326e2c0f33743ce8e887d5b90edf3f36cced (patch)
tree6405dfd95f3a98b731062ed80fcce412b4f10c13 /net
parent0c615f1cc3b333775b9c0b56e369f8dbca1e0226 (diff)
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: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-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) {