diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-09-24 15:09:30 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-09-28 12:16:27 +0200 |
commit | 0cea71a207508c2b8f563b2644ac46009832c8f4 (patch) | |
tree | 34dc05b002e841ab4722bfd15516b908d071f26a /hw | |
parent | 6f8fd2530e9a530f237240daf1c981fa5df7f978 (diff) | |
download | qemu-0cea71a207508c2b8f563b2644ac46009832c8f4.zip qemu-0cea71a207508c2b8f563b2644ac46009832c8f4.tar.gz qemu-0cea71a207508c2b8f563b2644ac46009832c8f4.tar.bz2 |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/virtio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio.c b/hw/virtio.c index 209c763..b5764bb 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -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++) |