[NTOSKRNL]

- ObReferenceObject() does NOT return an NTSTATUS. It returns the new reference count. Remove pointless NT_SUCCESS check
- Enable interrupts in amd54 page fault handler before calling MmAccessFault
- Add missing MmDecommittedPte for amd64

svn path=/trunk/; revision=56265
This commit is contained in:
Timo Kreuzer 2012-03-28 21:09:03 +00:00
parent 3bdad064e3
commit 03f0cf904e
3 changed files with 10 additions and 7 deletions

View file

@ -349,13 +349,7 @@ MmpPageOutPhysicalAddress(PFN_NUMBER Page)
ExReleaseFastMutex(&RmapListLock);
goto bail;
}
Status = ObReferenceObject(Process);
if (!NT_SUCCESS(Status))
{
DPRINT("bail\n");
ExReleaseFastMutex(&RmapListLock);
goto bail;
}
ObReferenceObject(Process);
ProcRef = TRUE;
AddressSpace = &Process->Vm;
}

View file

@ -416,6 +416,9 @@ FUNC KiPageFault
mov rdx, cr2
mov [rbp + KTRAP_FRAME_FaultAddress], rdx
/* Enable interrupts for the page fault handler */
sti
/* Call page fault handler */
mov ecx, [rbp + KTRAP_FRAME_ErrorCode] // StoreInstruction
and ecx, 1
@ -429,6 +432,9 @@ FUNC KiPageFault
test eax, eax
jge PageFaultReturn
/* Disable interrupts again for the debugger */
cli
/* Set parameter 1 to error code */
mov r9d, [rbp + KTRAP_FRAME_ErrorCode]

View file

@ -34,6 +34,9 @@ MMPTE DemandZeroPte = {{MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS}};
MMPTE PrototypePte = {{(MM_READWRITE << MM_PTE_SOFTWARE_PROTECTION_BITS) |
PTE_PROTOTYPE | (MI_PTE_LOOKUP_NEEDED << 32)}};
/* Template PTE for decommited page */
MMPTE MmDecommittedPte = {{MM_DECOMMIT << MM_PTE_SOFTWARE_PROTECTION_BITS}};
/* Address ranges */
PVOID MiSessionViewEnd;
PVOID MiSystemPteSpaceStart;