lkml.org 
[lkml]   [2020]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 4/8] vhost: Fix bad order in vhost_test_set_backend at enable
Date
The reset was not done properly: A init call was given with no active
backend. This solves that.

Fixes: ("7c48601a3d4d tools/virtio: Add --reset=random")

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
drivers/vhost/test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c
index 789c096e454b..6aed0cab8b17 100644
--- a/drivers/vhost/test.c
+++ b/drivers/vhost/test.c
@@ -293,8 +293,8 @@ static long vhost_test_set_backend(struct vhost_test *n, unsigned index, int fd)
backend = vhost_vq_get_backend(vq);
vhost_vq_set_backend(vq, NULL);
} else {
- r = vhost_vq_init_access(vq);
vhost_vq_set_backend(vq, backend);
+ r = vhost_vq_init_access(vq);
if (r == 0)
r = vhost_poll_start(&vq->poll, vq->kick);
}
--
2.18.1
\
 
 \ /
  Last update: 2020-04-16 09:58    [W:2.197 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site