diff options
author | David S. Miller <davem@davemloft.net> | 2012-11-29 18:51:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-29 18:51:17 +0100 |
commit | 8a2cf062b27ef5511a7d8a7ce6662fbc04f671b8 (patch) | |
tree | 31f32c0d9a548f0dbbe9f3a32aca5767093d98b4 /drivers/vhost | |
parent | net: ethernet: cpsw: fix build warnings for CPSW when CPTS not selected (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-8a2cf062b27ef5511a7d8a7ce6662fbc04f671b8.tar.xz linux-8a2cf062b27ef5511a7d8a7ce6662fbc04f671b8.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/vhost')
-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 ef8f5988f855..5a3d0f1eaf94 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1049,7 +1049,7 @@ static int translate_desc(struct vhost_dev *dev, u64 addr, u32 len, } _iov = iov + ret; size = reg->memory_size - addr + reg->guest_phys_addr; - _iov->iov_len = min((u64)len, size); + _iov->iov_len = min((u64)len - s, size); _iov->iov_base = (void __user *)(unsigned long) (reg->userspace_addr + addr - reg->guest_phys_addr); s += size; |