diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-14 19:02:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-14 19:02:49 -0400 |
commit | 1f9c632cde0c3d781463a88ce430a8dd4a7c1a0e (patch) | |
tree | 0ec9848980252d49870d3e09fde699be97138dd1 | |
parent | b03c036e6f96340dd311817c7b964dad183c4141 (diff) | |
parent | 0d4a3f2abbef73b9e5bb5f12213c275565473588 (diff) |
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, | |||
2071 | _iov = iov + ret; | 2071 | _iov = iov + ret; |
2072 | size = node->size - addr + node->start; | 2072 | size = node->size - addr + node->start; |
2073 | _iov->iov_len = min((u64)len - s, size); | 2073 | _iov->iov_len = min((u64)len - s, size); |
2074 | _iov->iov_base = (void __user *) | 2074 | _iov->iov_base = (void __user *)(unsigned long) |
2075 | ((unsigned long)node->userspace_addr + | 2075 | (node->userspace_addr + addr - node->start); |
2076 | array_index_nospec((unsigned long)(addr - node->start), | ||
2077 | node->size)); | ||
2078 | s += size; | 2076 | s += size; |
2079 | addr += size; | 2077 | addr += size; |
2080 | ++ret; | 2078 | ++ret; |