[NTOSKRNL]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 15 Feb 2016 21:22:05 +0000 (21:22 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 15 Feb 2016 21:22:05 +0000 (21:22 +0000)
If the cache wasn't initialized by the FSD serving the image, don't allow section creation to avoid later (dramatic) failure in CC.

Based on a patch by Sylvain Deverre.

CORE-10038 #comment Modified patch committed in r70756

svn path=/trunk/; revision=70756

reactos/ntoskrnl/mm/section.c

index b67257a..b7b6435 100644 (file)
@@ -3777,6 +3777,14 @@ MmCreateImageSection(PROS_SECTION_OBJECT *SectionObject,
     if (FileObject == NULL)
         return STATUS_INVALID_FILE_FOR_SECTION;
 
+#ifndef NEWCC
+    if (FileObject->SectionObjectPointer->SharedCacheMap == NULL)
+    {
+        DPRINT1("Denying section creation due to missing cache initialization\n");
+        return STATUS_INVALID_FILE_FOR_SECTION;
+    }
+#endif
+
     /*
      * Create the section
      */