diff options
author | 2022-03-14 11:21:52 -0700 | |
---|---|---|
committer | 2022-03-14 11:21:52 -0700 | |
commit | 6665ca15746dc34606b5d79fae278a101a368437 (patch) | |
tree | 86f722f8093f6bca689920d5da846ddb5990fa5c | |
parent | Linux 5.17-rc8 (diff) | |
parent | vhost: allow batching hint without size (diff) | |
download | wireguard-linux-6665ca15746dc34606b5d79fae278a101a368437.tar.xz wireguard-linux-6665ca15746dc34606b5d79fae278a101a368437.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 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
-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; } |