diff options
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r-- | drivers/vhost/vhost.c | 5 |
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) | |||
324 | dev->mm = NULL; | 324 | dev->mm = NULL; |
325 | 325 | ||
326 | WARN_ON(!list_empty(&dev->work_list)); | 326 | WARN_ON(!list_empty(&dev->work_list)); |
327 | kthread_stop(dev->worker); | 327 | if (dev->worker) { |
328 | kthread_stop(dev->worker); | ||
329 | dev->worker = NULL; | ||
330 | } | ||
328 | } | 331 | } |
329 | 332 | ||
330 | static int log_access_ok(void __user *log_base, u64 addr, unsigned long sz) | 333 | static int log_access_ok(void __user *log_base, u64 addr, unsigned long sz) |