From: Olaf Hering Date: Mon, 14 Nov 2011 17:49:14 +0000 (+0000) Subject: xenpaging: munmap all pages after page-in X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d2cb52cc6c4795d31ada3233efa465e96f009f11;p=xen.git xenpaging: munmap all pages after page-in Do munmap() on all mapped pages, not just the first one. Without this change the gfns backing the remaining pages can not be paged out again because the page count does not go down to 1. This change was missing from changeset 23827:d1d6abc1db20. Signed-off-by: Olaf Hering Committed-by: Ian Jackson --- diff --git a/tools/xenpaging/pagein.c b/tools/xenpaging/pagein.c index e2d7840894..579620f241 100644 --- a/tools/xenpaging/pagein.c +++ b/tools/xenpaging/pagein.c @@ -44,7 +44,7 @@ static void *page_in(void *arg) /* Ignore errors */ page = xc_map_foreign_pages(pia->xch, pia->dom, PROT_READ, gfns, num); if (page) - munmap(page, PAGE_SIZE); + munmap(page, PAGE_SIZE * num); } page_in_possible = 0; pthread_exit(NULL);