提交 615cc221 编写于 作者: M 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: NMichael S. Tsirkin <mst@redhat.com>
上级 87d6a412
...@@ -298,6 +298,7 @@ static long vhost_dev_set_owner(struct vhost_dev *dev) ...@@ -298,6 +298,7 @@ static long vhost_dev_set_owner(struct vhost_dev *dev)
return 0; return 0;
err_cgroup: err_cgroup:
kthread_stop(worker); kthread_stop(worker);
dev->worker = NULL;
err_worker: err_worker:
if (dev->mm) if (dev->mm)
mmput(dev->mm); mmput(dev->mm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册