aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-14 11:21:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-14 11:21:52 -0700
commit6665ca15746dc34606b5d79fae278a101a368437 (patch)
tree86f722f8093f6bca689920d5da846ddb5990fa5c /drivers
parent09688c0166e76ce2fb85e86b9d99be8b0084cdf9 (diff)
parent95932ab2ea07b79cdb33121e2f40ccda9e6a73b5 (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 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.c4
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;
}