瀏覽代碼

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: Michael S. Tsirkin <mst@redhat.com>
Michael S. Tsirkin 15 年之前
父節點
當前提交
615cc2211c
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/vhost/vhost.c

+ 1 - 0
drivers/vhost/vhost.c

@@ -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);