From: Bobby Eshleman <bobby.eshleman@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> Signed-off-by: Arseniy Krasnov <AVKrasnov@xxxxxxxxxxxxxx> --- 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