From: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
To: Stefano Garzarella <sgarzare@redhat.com>,
"edumazet@google.com" <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
Bobby Eshleman <bobby.eshleman@bytedance.com>,
Krasnov Arseniy <oxffffaa@gmail.com>,
"Arseniy Krasnov" <AVKrasnov@sberdevices.ru>,
kernel <kernel@sberdevices.ru>
Subject: [PATCH net-next v7 1/4] vsock: return errors other than -ENOMEM to socket
Date: Tue, 10 Jan 2023 10:13:23 +0000 [thread overview]
Message-ID: <65324bbb-7414-3c27-9dd3-7565010aa6b1@sberdevices.ru> (raw)
In-Reply-To: <67cd2d0a-1c58-baac-7b39-b8d4ea44f719@sberdevices.ru>
From: Bobby Eshleman <bobby.eshleman@bytedance.com>
This removes behaviour, where error code returned from any transport
was always switched to ENOMEM. For example when user tries to send too
big message via SEQPACKET socket, transport layers return EMSGSIZE, but
this error code was always replaced with ENOMEM and returned to user.
Signed-off-by: Bobby Eshleman <bobby.eshleman@bytedance.com>
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
---
net/vmw_vsock/af_vsock.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index d593d5b6d4b1..19aea7cba26e 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1861,8 +1861,9 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg,
written = transport->stream_enqueue(vsk,
msg, len - total_written);
}
+
if (written < 0) {
- err = -ENOMEM;
+ err = written;
goto out_err;
}
--
2.25.1
next prev parent reply other threads:[~2023-01-10 10:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 10:11 [PATCH net-next v7 0/4] vsock: update tools and error handling Arseniy Krasnov
2023-01-10 10:13 ` Arseniy Krasnov [this message]
2023-01-10 10:15 ` [PATCH net-next v7 2/4] test/vsock: rework message bounds test Arseniy Krasnov
2023-01-10 10:17 ` [PATCH net-next v7 3/4] test/vsock: add big message test Arseniy Krasnov
2023-01-10 10:18 ` [PATCH net-next v7 4/4] test/vsock: vsock_perf utility Arseniy Krasnov
2023-01-11 8:30 ` Stefano Garzarella
2023-01-12 11:53 ` Paolo Abeni
2023-01-12 11:55 ` Arseniy Krasnov
2023-01-12 12:10 ` [PATCH net-next v7 0/4] vsock: update tools and error handling patchwork-bot+netdevbpf
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=65324bbb-7414-3c27-9dd3-7565010aa6b1@sberdevices.ru \
--to=avkrasnov@sberdevices.ru \
--cc=bobby.eshleman@bytedance.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel@sberdevices.ru \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oxffffaa@gmail.com \
--cc=pabeni@redhat.com \
--cc=sgarzare@redhat.com \
--cc=virtualization@lists.linux-foundation.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
all inboxes | Powered by JetHome®