From 422463bf4aa918fadfba4e7c490f2040c847b9e7 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Sun, 6 Jul 2008 17:22:58 +0100 Subject: [PATCH] Only use domain_to_node() on non-null domain pointer. Signed-off-by: Keir Fraser --- xen/common/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 8502d77999..d497fdfd57 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -792,7 +792,7 @@ struct page_info *alloc_domheap_pages( ASSERT(!in_irq()); - if ( node == NUMA_NO_NODE ) + if ( (node == NUMA_NO_NODE) && (d != NULL) ) node = domain_to_node(d); bits = domain_clamp_alloc_bitsize(d, bits ? : (BITS_PER_LONG+PAGE_SHIFT)); -- 2.30.2