diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c index dcc8a1d5851e..511aa5ceeaca 100644 --- a/net/vmw_vsock/virtio_transport_common.c +++ b/net/vmw_vsock/virtio_transport_common.c @@ -55,7 +55,7 @@ static bool virtio_transport_can_zcopy(const struct virtio_transport *t_ops, return false; /* We can't send whole iov. */ - if (iov_iter->count > pkt_len) + if (!iov_iter->count || iov_iter->count > pkt_len) return false; /* Check that transport can send data in zerocopy mode. */