aboutsummaryrefslogtreecommitdiff
path: root/drivers/xen/gntdev.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2015-09-14 14:16:54 -0700
committerKevin Hilman <khilman@linaro.org>2015-09-14 14:16:54 -0700
commit0e4f19b4e5d6c4801d0ee2c26a5850de1b44f4af (patch)
treecbd277d85dedfe2f64b94c5e385b311e2c017137 /drivers/xen/gntdev.c
parent59255ac55ba6ecd195ef97c6bcd1303a7f838c94 (diff)
parent4d869de174c78ae29ca91b41581367c8092d933d (diff)
Diffstat (limited to 'drivers/xen/gntdev.c')
-rw-r--r--drivers/xen/gntdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 3c8803feba26..474d11499d0e 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -534,12 +534,14 @@ static int gntdev_release(struct inode *inode, struct file *flip)
pr_debug("priv %p\n", priv);
+ mutex_lock(&priv->lock);
while (!list_empty(&priv->maps)) {
map = list_entry(priv->maps.next, struct grant_map, next);
list_del(&map->next);
gntdev_put_map(NULL /* already removed */, map);
}
WARN_ON(!list_empty(&priv->freeable_maps));
+ mutex_unlock(&priv->lock);
if (use_ptemod)
mmu_notifier_unregister(&priv->mn, priv->mm);