]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
SystemVirtualCpuIndex() cannot use KeWaitForSingleObject()
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 30 Jan 2015 17:47:20 +0000 (17:47 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 30 Jan 2015 17:59:49 +0000 (17:59 +0000)
The function is called at > DISPATCH_LEVEL so it cannot wait, even with a
zero timeout. Having this call there causes the system to hang.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reported-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
src/xen/system.c

index efe50491566dc2a58eb8777fcd9582818404e59d..eb06becc1ff2cd41ee128fa5ccdbf949d6fd36b6 100644 (file)
@@ -728,20 +728,8 @@ SystemVirtualCpuIndex(
 {
     PSYSTEM_CONTEXT     Context = &SystemContext;
     PSYSTEM_CPU         Cpu = Context->Cpu[Index];
-    LARGE_INTEGER       Timeout;
-    NTSTATUS            status;
 
-    ASSERT3U(Index, <, MAXIMUM_PROCESSORS);
-
-    Timeout.QuadPart = 0;
-
-    // Make sure the SystemCpuInformation() has run
-    status = KeWaitForSingleObject(&Cpu->Event,
-                                   Executive,
-                                   KernelMode,
-                                   FALSE,
-                                   &Timeout);
-    ASSERT(NT_SUCCESS(status) && status != STATUS_TIMEOUT);
+    ASSERT(Cpu != NULL);
 
     return Cpu->ProcessorID;
 }