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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
---
 net/core/scm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/scm.c b/net/core/scm.c
index a75cd637a71ff..875df1c2989db 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)
-- 
2.26.2

Reply via email to