vhost: error handling fix
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Sep 2010 11:16:36 +0000 (14:16 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 6 Sep 2010 06:49:39 +0000 (09:49 +0300)
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>
drivers/vhost/vhost.c

index 1afa085..c579dcc 100644 (file)
@@ -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);