diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-03-17 23:56:06 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-17 23:56:58 +0300 |
commit | e243f39685af1bd6d837fa7bff40c1afdf3eb7fa (patch) | |
tree | 61e9d9b74a0814f950a693ebe8061293e4960b1e /drivers/vhost | |
parent | 1abea24af42c35c6eb537e4402836e2cde2a5b13 (diff) | |
parent | 551acdc3c3d2b6bc97f11e31dcf960bc36343bfc (diff) | |
download | linux-e243f39685af1bd6d837fa7bff40c1afdf3eb7fa.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/vhost')
-rw-r--r-- | drivers/vhost/vhost.c | 4 | ||||
-rw-r--r-- | drivers/vhost/vsock.c | 3 |
2 files changed, 5 insertions, 2 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; } diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 37f0b4274113..e6c9d41db1de 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -753,7 +753,8 @@ static int vhost_vsock_dev_release(struct inode *inode, struct file *file) /* Iterating over all connections for all CIDs to find orphans is * inefficient. Room for improvement here. */ - vsock_for_each_connected_socket(vhost_vsock_reset_orphans); + vsock_for_each_connected_socket(&vhost_transport.transport, + vhost_vsock_reset_orphans); /* Don't check the owner, because we are in the release path, so we * need to stop the vsock device in any case. |