Commit 6e8a4f9d authored by Christoph Hellwig's avatar Christoph Hellwig Committed by David S. Miller

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: 2618d530 ("net/scm: cleanup scm_detach_fds")
Reported-by: default avatarIdo Schimmel <idosch@idosch.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Tested-by: default avatarIdo Schimmel <idosch@mellanox.com>
Tested-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4fda8601
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment