Skip to content

Commit

Permalink
net/handshake: Remove unneeded check from handshake_dup()
Browse files Browse the repository at this point in the history
handshake_req_submit() now verifies that the socket has a file.

Fixes: 3b3009e ("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>
  • Loading branch information
Chuck Lever authored and Jakub Kicinski committed May 25, 2023
1 parent 0c615f1 commit a095326
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/handshake/netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a095326

Please sign in to comment.