From: Daniel De Graaf Date: Mon, 28 Nov 2011 16:49:10 +0000 (-0500) Subject: xen/gntalloc: release grant references on page free X-Git-Tag: firefly_0821_release~3680^2~3781^2~21 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0105d2b4fbc24c2fb6ca9bae650784dd7ddf0b12;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Daniel De Graaf Signed-off-by: Konrad Rzeszutek Wilk --- 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) if (!gnttab_end_foreign_access_ref(gref->gref_id, 0)) return; + + gnttab_free_grant_reference(gref->gref_id); } gref_size--;