[NTOSKNRL]

- Change an ASSERT to a KeBugCheck, since the assertion can fail for any invalid memory access and this is not an internal Mm failure.
- Remove 2 cases, that "Should NEVER happen on ARM3!!!", but can very well happen.
- Do NOT make the code cleaner, by releasing the PFN lock in the same function that acquires it, but keep it 2 functions down. This is because it *SHOULD* be that way, since some internal undocumented functions, that we do not implement but that are (theoretically) called from here, also do release the PFN lock. Thanks Alex for explaining this.

svn path=/trunk/; revision=52507
This commit is contained in:
Timo Kreuzer 2011-07-02 23:11:06 +00:00
parent bfba57801e
commit 12404ace17

View file

@ -583,10 +583,19 @@ MiDispatchFault(IN BOOLEAN StoreInstruction,
}
//
// The PTE must be invalid, but not totally blank
// The PTE must be invalid
//
ASSERT(TempPte.u.Hard.Valid == 0);
ASSERT(TempPte.u.Long != 0);
/* Check if the PTE is completely empty */
if (TempPte.u.Long == 0)
{
KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA,
(ULONG_PTR)Address,
StoreInstruction,
(ULONG_PTR)TrapInformation,
2);
}
//
// No prototype, transition or page file software PTEs in ARM3 yet
@ -727,11 +736,6 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction,
// Writing to a read-only page (the stuff ARM3 works with is write,
// so again, moot point).
//
if (StoreInstruction)
{
DPRINT1("Should NEVER happen on ARM3!!!\n");
return STATUS_ACCESS_VIOLATION;
}
//
// Otherwise, the PDE was probably invalid, and all is good now
@ -776,11 +780,6 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction,
// Writing to a read-only page (the stuff ARM3 works with is write,
// so again, moot point.
//
if (StoreInstruction)
{
DPRINT1("Should NEVER happen on ARM3!!!\n");
return STATUS_ACCESS_VIOLATION;
}
/* Release the working set */
MiUnlockWorkingSet(CurrentThread, WorkingSet);