diff options
author | 2019-09-14 16:02:49 -0700 | |
---|---|---|
committer | 2019-09-14 16:02:49 -0700 | |
commit | 1f9c632cde0c3d781463a88ce430a8dd4a7c1a0e (patch) | |
tree | 0ec9848980252d49870d3e09fde699be97138dd1 | |
parent | Merge tag 'riscv/for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux (diff) | |
parent | Revert "vhost: block speculation of translated descriptors" (diff) | |
download | wireguard-linux-1f9c632cde0c3d781463a88ce430a8dd4a7c1a0e.tar.xz wireguard-linux-1f9c632cde0c3d781463a88ce430a8dd4a7c1a0e.zip |
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"
-rw-r--r-- | drivers/vhost/vhost.c | 6 |
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; |