vhost: fix missing flag reset on stop
Commit550c9d27d1
("vhost: set/reset device flags internally") moves the VIRTIO_DEV_RUNNING set/reset to vhost lib. But I missed one reset on stop; here fixes it. Fixes:550c9d27d1
("vhost: set/reset device flags internally") Reported-by: Ciara Loftus <ciara.loftus@intel.com> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Tested-by: Ciara Loftus <ciara.loftus@intel.com>
This commit is contained in:
parent
2bfaec9072
commit
4feff06e50
@ -317,8 +317,10 @@ user_get_vring_base(int vid, struct vhost_vring_state *state)
|
||||
if (dev == NULL)
|
||||
return -1;
|
||||
/* We have to stop the queue (virtio) if it is running. */
|
||||
if (dev->flags & VIRTIO_DEV_RUNNING)
|
||||
if (dev->flags & VIRTIO_DEV_RUNNING) {
|
||||
dev->flags &= ~VIRTIO_DEV_RUNNING;
|
||||
notify_ops->destroy_device(vid);
|
||||
}
|
||||
|
||||
/* Here we are safe to get the last used index */
|
||||
vhost_get_vring_base(vid, state->index, state);
|
||||
|
Loading…
Reference in New Issue
Block a user