From: Paul Durrant Date: Wed, 9 Dec 2015 14:15:35 +0000 (+0000) Subject: Size XENBUS_CACHE Magazine array to maximum processor count X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7477b05263ba380310a519110a823741ff2a0a0e;p=people%2Fpauldu%2Fxenbus.git Size XENBUS_CACHE Magazine array to maximum processor count Sizing to active processor count means that the array will be too small if a processor is onlined after cache creation. Signed-off-by: Paul Durrant --- diff --git a/src/xenbus/cache.c b/src/xenbus/cache.c index 9727b14..5a14411 100644 --- a/src/xenbus/cache.c +++ b/src/xenbus/cache.c @@ -617,7 +617,7 @@ CacheCreate( if (!NT_SUCCESS(status)) goto fail4; - (*Cache)->MagazineCount = KeQueryActiveProcessorCountEx(ALL_PROCESSOR_GROUPS); + (*Cache)->MagazineCount = KeQueryMaximumProcessorCountEx(ALL_PROCESSOR_GROUPS); (*Cache)->Magazine = __CacheAllocate(sizeof (XENBUS_CACHE_MAGAZINE) * (*Cache)->MagazineCount); status = STATUS_NO_MEMORY;