mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[NTOSKRNL]
- Revert the hack in r47514 - The ASSERT is there to make sure the PFN lock is held - Fix the issue properly by holding the PFN lock while initializing svn path=/trunk/; revision=47516
This commit is contained in:
parent
b5781444a5
commit
59aacb176f
2 changed files with 8 additions and 1 deletions
|
@ -59,7 +59,7 @@ MiInsertInListTail(IN PMMPFNLIST ListHead,
|
|||
{
|
||||
PFN_NUMBER OldBlink, EntryIndex = MiGetPfnEntryIndex(Entry);
|
||||
|
||||
ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL);
|
||||
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
|
||||
ASSERT_LIST_INVARIANT(ListHead);
|
||||
|
||||
/* Get the back link */
|
||||
|
|
|
@ -457,12 +457,16 @@ MmInitializePageList(VOID)
|
|||
PMEMORY_ALLOCATION_DESCRIPTOR Md;
|
||||
PLIST_ENTRY NextEntry;
|
||||
ULONG NrSystemPages = 0;
|
||||
KIRQL OldIrql;
|
||||
|
||||
/* This is what a used page looks like */
|
||||
RtlZeroMemory(&UsedPage, sizeof(UsedPage));
|
||||
UsedPage.u3.e1.PageLocation = ActiveAndValid;
|
||||
UsedPage.u3.e2.ReferenceCount = 1;
|
||||
|
||||
/* Lock PFN database */
|
||||
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
|
||||
|
||||
/* Loop the memory descriptors */
|
||||
for (NextEntry = KeLoaderBlock->MemoryDescriptorListHead.Flink;
|
||||
NextEntry != &KeLoaderBlock->MemoryDescriptorListHead;
|
||||
|
@ -518,6 +522,9 @@ MmInitializePageList(VOID)
|
|||
MmPfnDatabase[0][i] = UsedPage;
|
||||
NrSystemPages++;
|
||||
}
|
||||
|
||||
/* Release the PFN database lock */
|
||||
KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql);
|
||||
|
||||
KeInitializeEvent(&ZeroPageThreadEvent, NotificationEvent, TRUE);
|
||||
DPRINT("Pages: %x %x\n", MmAvailablePages, NrSystemPages);
|
||||
|
|
Loading…
Reference in a new issue