Skip to contentSkip to conversation

vhost: error handling fix

PATCH New Michael S. Tsirkin 1 participant 1 message Sep 3, 2010

Subsystems (2)
lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

PATCH 1/1 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.

---

Dave, no need to bother with this one unless you really want to - I'll put it on my tree.

This is a follow up to Eric's patch - fixes error handling in a similar way.

 drivers/vhost/vhost.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/vhost/vhost.c +1 -0
index 7c75dce..666aa36 100644
@@ -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);
Signature · 1 line
1.7.2.rc0.14.g41c1c