# HG changeset patch # Parent 951a9879c34bee1dd2fa0329a541ae089f271c11 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 --- tools/xenpaging/pagein.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: xen-4.1.2-testing/tools/xenpaging/pagein.c =================================================================== --- xen-4.1.2-testing.orig/tools/xenpaging/pagein.c +++ xen-4.1.2-testing/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);