diff options
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r-- | drivers/vhost/vhost.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 99ac2cb08b43..dedaf81d8f36 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -1076,7 +1076,7 @@ static int translate_desc(struct vhost_dev *dev, u64 addr, u32 len, | |||
1076 | } | 1076 | } |
1077 | _iov = iov + ret; | 1077 | _iov = iov + ret; |
1078 | size = reg->memory_size - addr + reg->guest_phys_addr; | 1078 | size = reg->memory_size - addr + reg->guest_phys_addr; |
1079 | _iov->iov_len = min((u64)len, size); | 1079 | _iov->iov_len = min((u64)len - s, size); |
1080 | _iov->iov_base = (void __user *)(unsigned long) | 1080 | _iov->iov_base = (void __user *)(unsigned long) |
1081 | (reg->userspace_addr + addr - reg->guest_phys_addr); | 1081 | (reg->userspace_addr + addr - reg->guest_phys_addr); |
1082 | s += size; | 1082 | s += size; |