Author: tkreuzer
Date: Fri Nov 22 12:51:40 2013
New Revision: 61076

URL: http://svn.reactos.org/svn/reactos?rev=61076&view=rev
Log:
[NTOSKRNL]
Skip all images that were loaded using MmLoadSystemImage in 
MiFindInitializationCode. Drivers loaded by Mm are handled in 
MmFreeDriverInitialization (which we currently run for boot loaded images as 
well, so duplicated work...). But now at least session loaded images are NOT 
processed this way. Because even though they can have INIT sections, they don't 
neccessarily like it when stuff gets removed, especially win32k doesn't like it 
when it's .rsrc section is being discarded due to it's section flags!

Modified:
    trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c

Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c?rev=61076&r1=61075&r2=61076&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c     [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c     [iso-8859-1] Fri Nov 22 
12:51:40 2013
@@ -1457,6 +1457,15 @@
         LdrEntry = CONTAINING_RECORD(NextEntry, LDR_DATA_TABLE_ENTRY, 
InLoadOrderLinks);
         DllBase = (ULONG_PTR)LdrEntry->DllBase;
 
+        /* Only process boot loaded images. Other drivers are processed by
+           MmFreeDriverInitialization */
+        if (LdrEntry->Flags & LDRP_MM_LOADED)
+        {
+            /* Keep going */
+            NextEntry = NextEntry->Flink;
+            continue;
+        }
+
         /* Get the NT header */
         NtHeader = RtlImageNtHeader((PVOID)DllBase);
         if (!NtHeader)
@@ -2561,6 +2570,10 @@
     PFN_NUMBER PageFrameIndex;
     PMMPFN Pfn1;
     PAGED_CODE();
+
+    /* The page fault handler is broken and doesn't page back in! */
+    DPRINT1("WARNING: MiSetPagingOfDriver() called, but paging is broken! 
ignoring!\n");
+    return;
 
     /* Get the driver's base address */
     ImageBase = MiPteToAddress(PointerPte);


Reply via email to