virtio: don't mark unaccessed memory as dirty

offset of accessed buffer is calculated using iov_length, so it
can exceed accessed len. If that happens
math in len - offset wraps around, and size becomes wrong.
As real value is 0, so this is harmless but unnecessary.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Michael S. Tsirkin 2012-09-24 15:09:30 +02:00
parent 6f8fd2530e
commit 0cea71a207
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
elem->in_sg[i].iov_len,
1, size);
offset += elem->in_sg[i].iov_len;
offset += size;
}
for (i = 0; i < elem->out_num; i++)