aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-13 13:07:59 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-13 12:30:54 -0700
commit6e8a4f9dda3823274fa8a4c1aa5e6a93f9775749 (patch)
tree09c8e3d03ec28d71c173dfdb3043831f61e3c091 /net
parentMerge branch 'dwmac-meson8b-Ethernet-RX-delay-configuration' (diff)
downloadwireguard-linux-6e8a4f9dda3823274fa8a4c1aa5e6a93f9775749.tar.xz
wireguard-linux-6e8a4f9dda3823274fa8a4c1aa5e6a93f9775749.zip
net: ignore sock_from_file errors in __scm_install_fd
The code had historically been ignoring these errors, and my recent refactoring changed that, which broke ssh in some setups. Fixes: 2618d530dd8b ("net/scm: cleanup scm_detach_fds") Reported-by: Ido Schimmel <idosch@idosch.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Ido Schimmel <idosch@mellanox.com> Tested-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/scm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/scm.c b/net/core/scm.c
index a75cd637a71f..875df1c2989d 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -307,7 +307,7 @@ static int __scm_install_fd(struct file *file, int __user *ufd, int o_flags)
sock_update_classid(&sock->sk->sk_cgrp_data);
}
fd_install(new_fd, get_file(file));
- return error;
+ return 0;
}
static int scm_max_fds(struct msghdr *msg)