提交 0cea71a2 编写于 作者: M Michael S. Tsirkin

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: NMichael S. Tsirkin <mst@redhat.com>
上级 6f8fd253
......@@ -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++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册