diff options
-rw-r--r-- | tools/xenpaging/xenpaging.c | 3 | ||||
-rw-r--r-- | xen/arch/x86/mm/p2m.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index e2cbc614d0..1ab756efb2 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -455,9 +455,6 @@ static int xenpaging_evict_page(xenpaging_t *paging, goto out; } - /* Clear page */ - memset(page, 0, PAGE_SIZE); - munmap(page, PAGE_SIZE); /* Tell Xen to evict page */ diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 473816c9f9..004cd9b5b1 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -748,6 +748,9 @@ int p2m_mem_paging_evict(struct domain *d, unsigned long gfn) set_p2m_entry(p2m, gfn, _mfn(INVALID_MFN), 0, p2m_ram_paged, a); audit_p2m(p2m, 1); + /* Clear content before returning the page to Xen */ + scrub_one_page(page); + /* Put the page back so it gets freed */ put_page(page); |