[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <675b1f93-dc07-0a70-0622-c3fc6236c8bb@sberdevices.ru>
Date: Fri, 25 Nov 2022 17:08:06 +0000
From: Arseniy Krasnov <AVKrasnov@...rdevices.ru>
To: Stefano Garzarella <sgarzare@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"Jakub Kicinski" <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
"kys@...rosoft.com" <kys@...rosoft.com>,
"haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
"Dexuan Cui" <decui@...rosoft.com>,
Bryan Tan <bryantan@...are.com>,
Vishnu Dasa <vdasa@...are.com>,
Arseniy Krasnov <AVKrasnov@...rdevices.ru>,
"Krasnov Arseniy" <oxffffaa@...il.com>,
Bobby Eshleman <bobby.eshleman@...il.com>,
Bobby Eshleman <bobby.eshleman@...edance.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
kernel <kernel@...rdevices.ru>
Subject: [RFC PATCH v2 3/6] vsock/vmci: always return ENOMEM in case of error
From: Bobby Eshleman <bobby.eshleman@...edance.com>
This saves original behaviour from af_vsock.c - switch any error
code returned from transport layer to ENOMEM.
Signed-off-by: Bobby Eshleman <bobby.eshleman@...edance.com>
Signed-off-by: Arseniy Krasnov <AVKrasnov@...rdevices.ru>
---
net/vmw_vsock/vmci_transport.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 842c94286d31..289a36a203a2 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -1838,7 +1838,14 @@ static ssize_t vmci_transport_stream_enqueue(
struct msghdr *msg,
size_t len)
{
- return vmci_qpair_enquev(vmci_trans(vsk)->qpair, msg, len, 0);
+ int 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
Powered by blists - more mailing lists