[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] mm: disallow MEMF_no_refcount to be passed for domain-owned allocations
commit d13e07df79a1ee209dcbe02c52b59ced6210b826 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Nov 23 12:08:09 2018 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Nov 23 12:08:09 2018 +0100 mm: disallow MEMF_no_refcount to be passed for domain-owned allocations When such pages get assigned to domains (and hence their ->tot_pages not incremented accordingly) we would otherwise also need to suppress decrementing the count when freeing those pages. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/common/page_alloc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 08ee8cfbb9..4a2cbda1db 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2303,6 +2303,11 @@ struct page_info *alloc_domheap_pages( if ( memflags & MEMF_no_owner ) memflags |= MEMF_no_refcount; + else if ( (memflags & MEMF_no_refcount) && d ) + { + ASSERT(!(memflags & MEMF_no_refcount)); + return NULL; + } if ( dma_bitsize && ((dma_zone = bits_to_zone(dma_bitsize)) < zone_hi) ) pg = alloc_heap_pages(dma_zone + 1, zone_hi, order, memflags, d); -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |