summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-09-15 02:02:49 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-15 02:02:49 +0300
commit1f9c632cde0c3d781463a88ce430a8dd4a7c1a0e (patch)
tree0ec9848980252d49870d3e09fde699be97138dd1 /drivers
parentb03c036e6f96340dd311817c7b964dad183c4141 (diff)
parent0d4a3f2abbef73b9e5bb5f12213c275565473588 (diff)
downloadlinux-1f9c632cde0c3d781463a88ce430a8dd4a7c1a0e.tar.xz
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio fix from Michael Tsirkin: "A last minute revert The 32-bit build got broken by the latest defence in depth patch. Revert and we'll try again in the next cycle" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: Revert "vhost: block speculation of translated descriptors"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vhost/vhost.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index acabf20b069e..36ca2cf419bf 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -2071,10 +2071,8 @@ static int translate_desc(struct vhost_virtqueue *vq, u64 addr, u32 len,
_iov = iov + ret;
size = node->size - addr + node->start;
_iov->iov_len = min((u64)len - s, size);
- _iov->iov_base = (void __user *)
- ((unsigned long)node->userspace_addr +
- array_index_nospec((unsigned long)(addr - node->start),
- node->size));
+ _iov->iov_base = (void __user *)(unsigned long)
+ (node->userspace_addr + addr - node->start);
s += size;
addr += size;
++ret;