mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[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! svn path=/trunk/; revision=61076
This commit is contained in:
parent
cd2e06b94c
commit
746a4e93ea
1 changed files with 13 additions and 0 deletions
|
@ -1457,6 +1457,15 @@ MiFindInitializationCode(OUT PVOID *StartVa,
|
|||
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)
|
||||
|
@ -2562,6 +2571,10 @@ MiSetPagingOfDriver(IN PMMPTE PointerPte,
|
|||
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);
|
||||
ASSERT(MI_IS_SESSION_IMAGE_ADDRESS(ImageBase) == FALSE);
|
||||
|
|
Loading…
Reference in a new issue