aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vhost/vhost.c
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2013-03-13 17:35:08 -0700
committerTodd Poynor <toddpoynor@google.com>2013-03-13 17:35:08 -0700
commit1249d25539343d1a7fe361c8d40be7a5df5b0216 (patch)
tree770c9a33604bb00c62f44d780aefab27e4eb9379 /drivers/vhost/vhost.c
parent4aad13d07babf68c1d0d37ff1e5f797573c4fd2a (diff)
parent0b203ab4aacdb6e6dfb8c277aa290f0a02428e6f (diff)
downloadkernel_samsung_tuna-1249d25539343d1a7fe361c8d40be7a5df5b0216.zip
kernel_samsung_tuna-1249d25539343d1a7fe361c8d40be7a5df5b0216.tar.gz
kernel_samsung_tuna-1249d25539343d1a7fe361c8d40be7a5df5b0216.tar.bz2
Merge branch 'android-3.0' into android-omap-3.0
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r--drivers/vhost/vhost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 61047fe..e3fac28 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -986,7 +986,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;