From: Christoph Hellwig <hch@lst.de>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Ido Schimmel <idosch@idosch.org>
Subject: [PATCH] net: ignore sock_from_file errors in __scm_install_fd
Date: Wed, 13 May 2020 13:07:59 +0200 [thread overview]
Message-ID: <20200513110759.2362955-1-hch@lst.de> (raw)
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>
---
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
next reply other threads:[~2020-05-13 11:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 11:07 Christoph Hellwig [this message]
2020-05-13 11:52 ` [PATCH] net: ignore sock_from_file errors in __scm_install_fd Ido Schimmel
2020-05-13 13:37 ` Ioana Ciornei
2020-05-13 19:31 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200513110759.2362955-1-hch@lst.de \
--to=hch@lst.de \
--cc=davem@davemloft.net \
--cc=idosch@idosch.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).