Message ID | 067371c8-f5a8-59a5-9485-cee85e3d27ef@sberdevices.ru (mailing list archive) |
---|---|
State | Accepted |
Commit | 02ab696febab622c4c837d509f6825884c952c22 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | vsock: return errors other than -ENOMEM to socket | expand |
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 5f2dda35c980..413407bb646c 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -2043,7 +2043,7 @@ static int __vsock_stream_recvmsg(struct sock *sk, struct msghdr *msg, read = transport->stream_dequeue(vsk, msg, len - copied, flags); if (read < 0) { - err = -ENOMEM; + err = read; break; } @@ -2094,7 +2094,7 @@ static int __vsock_seqpacket_recvmsg(struct sock *sk, struct msghdr *msg, msg_len = transport->seqpacket_dequeue(vsk, msg, flags); if (msg_len < 0) { - err = -ENOMEM; + err = msg_len; goto out; }