[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<168321386878.16695.14651822244436092067.stgit@oracle-102.nfsv4bat.org>
Date: Thu, 04 May 2023 11:24:38 -0400
From: Chuck Lever <cel@...nel.org>
To: kernel-tls-handshake@...ts.linux.dev
Cc: netdev@...r.kernel.org, dan.carpenter@...aro.org
Subject: [PATCH 1/5] net/handshake: Remove unneeded check from handshake_dup()
From: Chuck Lever <chuck.lever@...cle.com>
handshake_req_submit() now verifies that the socket has a file.
Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests")
Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
---
net/handshake/netlink.c | 3 ---
1 file changed, 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) {
Powered by blists - more mailing lists