vsock: return errors other than -ENOMEM to socket
This removes behaviour, where error code returned from any transport
was always switched to ENOMEM. This works in the same way as:
commit
c43170b7e1
("vsock: return errors other than -ENOMEM to socket"),
but for receive calls.
Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Родитель
f59f3006ca
Коммит
02ab696feb
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче