diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-14 21:21:52 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-03-14 21:21:52 +0300 |
commit | 6665ca15746dc34606b5d79fae278a101a368437 (patch) | |
tree | 86f722f8093f6bca689920d5da846ddb5990fa5c /drivers | |
parent | 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 (diff) | |
parent | 95932ab2ea07b79cdb33121e2f40ccda9e6a73b5 (diff) | |
download | linux-6665ca15746dc34606b5d79fae278a101a368437.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 regression fix.
I thought we did a lot of testing, but a regression still managed to
sneak in. The fix seems trivial"
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
vhost: allow batching hint without size
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vhost/vhost.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 082380c03a3e..1768362115c6 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -1170,7 +1170,9 @@ ssize_t vhost_chr_write_iter(struct vhost_dev *dev, goto done; } - if (msg.size == 0) { + if ((msg.type == VHOST_IOTLB_UPDATE || + msg.type == VHOST_IOTLB_INVALIDATE) && + msg.size == 0) { ret = -EINVAL; goto done; } |