Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[firefly-linux-kernel-4.4.55.git] / drivers / vhost / test.c
index 734e1d74ad805a1547ed867dd8363f09bcd9e2f8..fc9a1d75281f33d57be305b3c724195c578334de 100644 (file)
@@ -195,8 +195,13 @@ static long vhost_test_run(struct vhost_test *n, int test)
                                                    lockdep_is_held(&vq->mutex));
                rcu_assign_pointer(vq->private_data, priv);
 
+               r = vhost_init_used(&n->vqs[index]);
+
                mutex_unlock(&vq->mutex);
 
+               if (r)
+                       goto err;
+
                if (oldpriv) {
                        vhost_test_flush_vq(n, index);
                }