Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Sep 2019 23:02:49 +0000 (16:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Sep 2019 23:02:49 +0000 (16:02 -0700)
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"

drivers/vhost/vhost.c

index acabf20b069efabc216f33477ea8f77b588450e1..36ca2cf419bfebf475021d995640f383b154ee5e 100644 (file)
@@ -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;