Author: arty
Date: Sun Feb 19 14:13:51 2012
New Revision: 55713

URL: http://svn.reactos.org/svn/reactos?rev=55713&view=rev
Log:
[NEWCC]
Add necessary NULL check.  Add pageout case for a page that's
only in segment page tables.

Modified:
    branches/arty-newcc/ntoskrnl/mm/rmap.c

Modified: branches/arty-newcc/ntoskrnl/mm/rmap.c
URL: 
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/mm/rmap.c?rev=55713&r1=55712&r2=55713&view=diff
==============================================================================
--- branches/arty-newcc/ntoskrnl/mm/rmap.c [iso-8859-1] (original)
+++ branches/arty-newcc/ntoskrnl/mm/rmap.c [iso-8859-1] Sun Feb 19 14:13:51 2012
@@ -58,7 +58,15 @@
 
    ExAcquireFastMutex(&RmapListLock);
    entry = MmGetRmapListHeadPage(Page);
-   while (RMAP_IS_SEGMENT(entry->Address))
+
+#ifdef NEWCC
+   // Special case for NEWCC: we can have a page that's only in a segment
+   // page table
+   if (entry && RMAP_IS_SEGMENT(entry->Address) && entry->Next == NULL)
+       return MmpPageOutPhysicalAddress(Page);
+#endif
+
+   while (entry && RMAP_IS_SEGMENT(entry->Address))
        entry = entry->Next;
 
    if (entry == NULL)


Reply via email to