]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
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 1afa08527e089c2b7fcdf4107b56a19d66248a89..c579dcc9200ccabe0f1bcf79afed59577e4a6f38 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);