Revision: 16183
          http://sourceforge.net/p/edk2/code/16183
Author:   jljusten
Date:     2014-09-28 06:21:46 +0000 (Sun, 28 Sep 2014)
Log Message:
-----------
EmulatorPkg/MpService: Fix a NULL reference

when making a CreateEvent() to call CpuCheckAllAPsStatus(),
the Context parameter was NULL in CpuCheckAllAPsStatus(),
so we must not use the Context as the ProcessorData pointer.
and should recalculate it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>

Modified Paths:
--------------
    trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c

Modified: trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c
===================================================================
--- trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c    2014-09-28 01:15:46 UTC 
(rev 16182)
+++ trunk/edk2/EmulatorPkg/CpuRuntimeDxe/MpService.c    2014-09-28 06:21:46 UTC 
(rev 16183)
@@ -984,10 +984,9 @@
     gMPSystem.Timeout -= gPollInterval;
   }
 
-  ProcessorData = (PROCESSOR_DATA_BLOCK *) Context;
-
   for (ProcessorNumber = 0; ProcessorNumber < gMPSystem.NumberOfProcessors; 
ProcessorNumber++) {
-    if ((ProcessorData[ProcessorNumber].Info.StatusFlag & 
PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
+    ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber];
+    if ((ProcessorData->Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == 
PROCESSOR_AS_BSP_BIT) {
      // Skip BSP
       continue;
     }
@@ -1045,7 +1044,8 @@
     //
     if (gMPSystem.FailedList != NULL) {
       for (ProcessorNumber = 0; ProcessorNumber < 
gMPSystem.NumberOfProcessors; ProcessorNumber++) {
-        if ((ProcessorData[ProcessorNumber].Info.StatusFlag & 
PROCESSOR_AS_BSP_BIT) == PROCESSOR_AS_BSP_BIT) {
+        ProcessorData = &gMPSystem.ProcessorData[ProcessorNumber];
+        if ((ProcessorData->Info.StatusFlag & PROCESSOR_AS_BSP_BIT) == 
PROCESSOR_AS_BSP_BIT) {
          // Skip BSP
           continue;
         }


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to