提交 c43170b7 编写于 作者: B Bobby Eshleman 提交者: Paolo Abeni

vsock: return errors other than -ENOMEM to socket

This removes behaviour, where error code returned from any transport
was always switched to ENOMEM. For example when user tries to send too
big message via SEQPACKET socket, transport layers return EMSGSIZE, but
this error code was always replaced with ENOMEM and returned to user.
Signed-off-by: NBobby Eshleman <bobby.eshleman@bytedance.com>
Signed-off-by: NArseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: NStefano Garzarella <sgarzare@redhat.com>
Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
上级 d4f12a82
......@@ -1861,8 +1861,9 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg,
written = transport->stream_enqueue(vsk,
msg, len - total_written);
}
if (written < 0) {
err = -ENOMEM;
err = written;
goto out_err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册