Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ionescu007/SimpleVisor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorionescu007 <aionescu+git@gmail.com>2016-08-29 05:35:43 +0300
committerionescu007 <aionescu+git@gmail.com>2016-08-29 05:35:43 +0300
commitc4b296c5bd3fd293853694de6b32a0a906c48283 (patch)
treea2217f8c4501d4fc821db0a88f395b547052a982
parentcac433f845c1713b83f78fa5b6a0bdbcafd8fe37 (diff)
Fix a silly bug
Computed the mask incorrectly for success case.
-rw-r--r--shv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shv.c b/shv.c
index ba2310e..d6fa1dd 100644
--- a/shv.c
+++ b/shv.c
@@ -98,10 +98,11 @@ ShvInitialize (
//
// Note that each VP is responsible for freeing its VP data on failure.
//
- if (dpcContext.InitMask != (1ULL << cpuCount))
+ if (dpcContext.InitMask != ((1ULL << cpuCount) - 1))
{
DbgPrintEx(77, 0, "The SHV failed to initialize. CPU Mask: %llx\n",
dpcContext.InitMask);
+ NT_ASSERT(dpcContext.FailureStatus != STATUS_SUCCESS);
ExFreePoolWithTag(ShvGlobalData, 'ShvA');
return dpcContext.FailureStatus;
}