vhost/test: fix build for vhost test
authorTiwei Bie <tiwei.bie@intel.com>
Wed, 28 Aug 2019 05:36:59 +0000 (13:36 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 4 Sep 2019 10:21:17 +0000 (06:21 -0400)
Since below commit, callers need to specify the iov_limit in
vhost_dev_init() explicitly.

Fixes: b46a0bf78ad7 ("vhost: fix OOB in get_rx_bufs()")
Cc: stable@vger.kernel.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/vhost/test.c

index 9e90e969af5550254a8d2b68e58b1fc6c3033427..ac4f762c4f6513e901039e507d608da04b25e529 100644 (file)
@@ -115,7 +115,7 @@ static int vhost_test_open(struct inode *inode, struct file *f)
        dev = &n->dev;
        vqs[VHOST_TEST_VQ] = &n->vqs[VHOST_TEST_VQ];
        n->vqs[VHOST_TEST_VQ].handle_kick = handle_vq_kick;
-       vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX);
+       vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX, UIO_MAXIOV);
 
        f->private_data = n;