aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/gntalloc.c
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2011-11-28 11:49:10 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-12-16 11:26:02 -0500
commit0105d2b4fbc24c2fb6ca9bae650784dd7ddf0b12 (patch)
tree9442598b5e9d959ccfd6661e3c727840692028dc /drivers/xen/gntalloc.c
parentc3b3f16d1bceb5ac5f21528f889810b4ac5a3596 (diff)
xen/gntalloc: release grant references on page free
gnttab_end_foreign_access_ref does not return the grant reference it is passed to the free list; gnttab_free_grant_reference needs to be explicitly called. While gnttab_end_foreign_access provides a wrapper for this, it is unsuitable because it does not return errors. Reported-by: Anil Madhavapeddy <anil@recoil.org> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/gntalloc.c')
-rw-r--r--drivers/xen/gntalloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/xen/gntalloc.c b/drivers/xen/gntalloc.c
index c95181f43a6a..f330a4b8b685 100644
--- a/drivers/xen/gntalloc.c
+++ b/drivers/xen/gntalloc.c
@@ -191,6 +191,8 @@ static void __del_gref(struct gntalloc_gref *gref)
191 191
192 if (!gnttab_end_foreign_access_ref(gref->gref_id, 0)) 192 if (!gnttab_end_foreign_access_ref(gref->gref_id, 0))
193 return; 193 return;
194
195 gnttab_free_grant_reference(gref->gref_id);
194 } 196 }
195 197
196 gref_size--; 198 gref_size--;