From: Boris Ostrovsky Date: Tue, 19 Sep 2017 15:47:47 +0000 (+0200) Subject: mm: scrub pages returned back to heap if MEMF_no_scrub is set X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1389 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7d190bdde9fd070b4b98bad33a1f68e3b02952c5;p=xen.git mm: scrub pages returned back to heap if MEMF_no_scrub is set Set free_heap_pages()'s need_scrub to true if alloc_domheap_pages() returns pages back to heap as result of assign_pages() error when those pages were requested with MEMF_no_scrub flag. We need to do this because there is a possibility that alloc_heap_pages() might clear buddy's PGC_need_scrubs flag without actually clearing the page. Signed-off-by: Boris Ostrovsky Reviewed-by: Jan Beulich --- diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 7ed8404d2d..0b9f6cc6df 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2226,7 +2226,7 @@ struct page_info *alloc_domheap_pages( if ( d && !(memflags & MEMF_no_owner) && assign_pages(d, pg, order, memflags) ) { - free_heap_pages(pg, order, false); + free_heap_pages(pg, order, memflags & MEMF_no_scrub); return NULL; }