Skip to content

Commit

Permalink
net: ignore sock_from_file errors in __scm_install_fd
Browse files Browse the repository at this point in the history
The code had historically been ignoring these errors, and my recent
refactoring changed that, which broke ssh in some setups.

Fixes: 2618d53 ("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>
  • Loading branch information
Christoph Hellwig authored and David S. Miller committed May 13, 2020
1 parent 4fda860 commit 6e8a4f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6e8a4f9

Please sign in to comment.