diff options
Diffstat (limited to 'drivers/xen/gntdev.c')
-rw-r--r-- | drivers/xen/gntdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 67b9163db718..0dbb222daaf1 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c | |||
@@ -568,12 +568,14 @@ static int gntdev_release(struct inode *inode, struct file *flip) | |||
568 | 568 | ||
569 | pr_debug("priv %p\n", priv); | 569 | pr_debug("priv %p\n", priv); |
570 | 570 | ||
571 | mutex_lock(&priv->lock); | ||
571 | while (!list_empty(&priv->maps)) { | 572 | while (!list_empty(&priv->maps)) { |
572 | map = list_entry(priv->maps.next, struct grant_map, next); | 573 | map = list_entry(priv->maps.next, struct grant_map, next); |
573 | list_del(&map->next); | 574 | list_del(&map->next); |
574 | gntdev_put_map(NULL /* already removed */, map); | 575 | gntdev_put_map(NULL /* already removed */, map); |
575 | } | 576 | } |
576 | WARN_ON(!list_empty(&priv->freeable_maps)); | 577 | WARN_ON(!list_empty(&priv->freeable_maps)); |
578 | mutex_unlock(&priv->lock); | ||
577 | 579 | ||
578 | if (use_ptemod) | 580 | if (use_ptemod) |
579 | mmu_notifier_unregister(&priv->mn, priv->mm); | 581 | mmu_notifier_unregister(&priv->mn, priv->mm); |