Author: cgutman
Date: Sun Mar  4 23:45:16 2012
New Revision: 56022

URL: http://svn.reactos.org/svn/reactos?rev=56022&view=rev
Log:
[NEWCC]
- Add missing wait entry handling

Modified:
    trunk/reactos/ntoskrnl/cache/section/fault.c
    trunk/reactos/ntoskrnl/cache/section/swapout.c

Modified: trunk/reactos/ntoskrnl/cache/section/fault.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/fault.c?rev=56022&r1=56021&r2=56022&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/fault.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/fault.c [iso-8859-1] Sun Mar  4 
23:45:16 2012
@@ -158,10 +158,22 @@
                        return Status;
                }
        }
+       else if (MM_IS_WAIT_PTE(Entry))
+       {
+               MmUnlockSectionSegment(Segment);
+               return STATUS_SUCCESS + 1;
+       }
        else if (Entry)
        {
                PFN_NUMBER Page = PFN_FROM_SSE(Entry);
                DPRINT("Take reference to page %x #\n", Page);
+
+               if (MiGetPfnEntry(Page) == NULL)
+               {
+                       DPRINT1("Found no PFN entry for page 0x%x in page entry 
0x%x (segment: 0x%p, offset: %08x%08x)\n",
+                       Page, Entry, Segment, TotalOffset.HighPart, 
TotalOffset.LowPart);
+                       KeBugCheck(CACHE_MANAGER);
+               }
 
                MmReferencePage(Page);
 

Modified: trunk/reactos/ntoskrnl/cache/section/swapout.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/swapout.c?rev=56022&r1=56021&r2=56022&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/swapout.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/swapout.c [iso-8859-1] Sun Mar  4 
23:45:16 2012
@@ -204,6 +204,12 @@
 
        Entry = MmGetPageEntrySectionSegment(Segment, &TotalOffset);
 
+       if (MM_IS_WAIT_PTE(Entry))
+       {
+               MmUnlockSectionSegment(Segment);
+               return STATUS_SUCCESS + 1;
+       }
+
        if (Dirty) {
         DPRINT("Dirty page: %p:%p segment %p offset %08x%08x\n", Process, 
Address, Segment, TotalOffset.HighPart, TotalOffset.LowPart);
                MmSetPageEntrySectionSegment(Segment, &TotalOffset, 
DIRTY_SSE(Entry));
@@ -362,7 +368,7 @@
                   if (Status == STATUS_SUCCESS + 1)
                   {
                           // Wait page ... the other guy has it, so we'll just 
fail for now
-                          DPRINTC("Wait entry ... can't continue\n");
+                          DPRINT1("Wait entry ... can't continue\n");
                           Status = STATUS_UNSUCCESSFUL;
                           goto bail;
                   }


Reply via email to