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: David S. Miller <davem@davemloft.net>
  • Loading branch information
Chuck Lever authored and David S. Miller committed May 12, 2023
1 parent 0fae884 commit b16d76f
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 b16d76f

Please sign in to comment.