Commit 615cc221 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin

vhost: error handling fix

vhost should set worker to NULL on cgroups attach failure,
so that we won't try to destroy the worker again on close.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 87d6a412
......@@ -298,6 +298,7 @@ static long vhost_dev_set_owner(struct vhost_dev *dev)
return 0;
err_cgroup:
kthread_stop(worker);
dev->worker = NULL;
err_worker:
if (dev->mm)
mmput(dev->mm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment