Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -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);