* [PATCH net] vsock/vmci: convert VMCI error code to -ENOMEM on send
@ 2023-03-31 7:56 Arseniy Krasnov
2023-03-31 8:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Arseniy Krasnov @ 2023-03-31 7:56 UTC (permalink / raw)
To: Stefan Hajnoczi, Stefano Garzarella, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Bobby Eshleman,
Bryan Tan, Vishnu Dasa
Cc: kvm, virtualization, netdev, linux-kernel, kernel, oxffffaa,
avkrasnov, pv-drivers
This adds conversion of VMCI specific error code to general -ENOMEM. It
is needed, because af_vsock.c passes error value returned from transport
to the user, which does not expect to get VMCI_ERROR_* values.
Fixes: c43170b7e157 ("vsock: return errors other than -ENOMEM to socket")
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
---
net/vmw_vsock/vmci_transport.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 36eb16a40745..95cc4d79ba29 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -1842,7 +1842,13 @@ static ssize_t vmci_transport_stream_enqueue(
struct msghdr *msg,
size_t len)
{
- return vmci_qpair_enquev(vmci_trans(vsk)->qpair, msg, len, 0);
+ ssize_t err;
+
+ err = vmci_qpair_enquev(vmci_trans(vsk)->qpair, msg, len, 0);
+ if (err < 0)
+ err = -ENOMEM;
+
+ return err;
}
static s64 vmci_transport_stream_has_data(struct vsock_sock *vsk)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] vsock/vmci: convert VMCI error code to -ENOMEM on send
2023-03-31 7:56 [PATCH net] vsock/vmci: convert VMCI error code to -ENOMEM on send Arseniy Krasnov
@ 2023-03-31 8:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-31 8:50 UTC (permalink / raw)
To: Arseniy Krasnov
Cc: stefanha, sgarzare, davem, edumazet, kuba, pabeni, bobby.eshleman,
bryantan, vdasa, kvm, virtualization, netdev, linux-kernel,
kernel, oxffffaa, avkrasnov, pv-drivers
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Fri, 31 Mar 2023 10:56:41 +0300 you wrote:
> This adds conversion of VMCI specific error code to general -ENOMEM. It
> is needed, because af_vsock.c passes error value returned from transport
> to the user, which does not expect to get VMCI_ERROR_* values.
>
> Fixes: c43170b7e157 ("vsock: return errors other than -ENOMEM to socket")
> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
> Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
>
> [...]
Here is the summary with links:
- [net] vsock/vmci: convert VMCI error code to -ENOMEM on send
https://git.kernel.org/netdev/net/c/ffa5395a7901
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-31 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-31 7:56 [PATCH net] vsock/vmci: convert VMCI error code to -ENOMEM on send Arseniy Krasnov
2023-03-31 8:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox