summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/vhost.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-10-07 09:43:11 +0200
committerIngo Molnar <mingo@elte.hu>2010-10-07 09:43:11 +0200
commitd4f8f217b8a5d5bd02af979650418dca4caec472 (patch)
treeaf047bfa9729c975e24cb7624107574e884d3a57 /drivers/vhost/vhost.c
parentrcu: Add advice to PROVE_RCU_REPEATEDLY kernel config parameter (diff)
parentrcu: move check from rcu_dereference_bh to rcu_read_lock_bh_held (diff)
downloadlinux-d4f8f217b8a5d5bd02af979650418dca4caec472.tar.xz
linux-d4f8f217b8a5d5bd02af979650418dca4caec472.zip
Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-2.6-rcu into core/rcu
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r--drivers/vhost/vhost.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index b5c49478d203..ff33e7ccb1d0 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -324,7 +324,10 @@ void vhost_dev_cleanup(struct vhost_dev *dev)
dev->mm = NULL;
WARN_ON(!list_empty(&dev->work_list));
- kthread_stop(dev->worker);
+ if (dev->worker) {
+ kthread_stop(dev->worker);
+ dev->worker = NULL;
+ }
}
static int log_access_ok(void __user *log_base, u64 addr, unsigned long sz)