From: Michael S. Tsirkin Date: Thu, 2 Sep 2010 11:16:36 +0000 (+0300) Subject: vhost: error handling fix X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=615cc2211c17ed05a2a5d94abdac6c340a8ea508;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 1afa08527e08..c579dcc9200c 100644 --- a/drivers/vhost/vhost.c +++ b/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);