mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +00:00
[NTOSKRNL/MM]
- MiIsEntireRangeCommitted: Ensure the PTE we are checking is really faulted in. - Prefer MiPteToPde and MiPdeToPte (which should really be called MiFirstPteInPde) instead of MiAddressToPte and MiPteToAddress Fixes weird failed ASSERT in page fault handler when using DPH. svn path=/trunk/; revision=66334
This commit is contained in:
parent
873109862d
commit
51fd410d89
|
@ -1994,14 +1994,13 @@ MiIsEntireRangeCommitted(IN ULONG_PTR StartingAddress,
|
||||||
if (OnBoundary)
|
if (OnBoundary)
|
||||||
{
|
{
|
||||||
/* Is this PDE demand zero? */
|
/* Is this PDE demand zero? */
|
||||||
PointerPde = MiAddressToPte(PointerPte);
|
PointerPde = MiPteToPde(PointerPte);
|
||||||
if (PointerPde->u.Long != 0)
|
if (PointerPde->u.Long != 0)
|
||||||
{
|
{
|
||||||
/* It isn't -- is it valid? */
|
/* It isn't -- is it valid? */
|
||||||
if (PointerPde->u.Hard.Valid == 0)
|
if (PointerPde->u.Hard.Valid == 0)
|
||||||
{
|
{
|
||||||
/* Nope, fault it in */
|
/* Nope, fault it in */
|
||||||
PointerPte = MiPteToAddress(PointerPde);
|
|
||||||
MiMakeSystemAddressValid(PointerPte, Process);
|
MiMakeSystemAddressValid(PointerPte, Process);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2009,13 +2008,13 @@ MiIsEntireRangeCommitted(IN ULONG_PTR StartingAddress,
|
||||||
{
|
{
|
||||||
/* The PTE was already valid, so move to the next one */
|
/* The PTE was already valid, so move to the next one */
|
||||||
PointerPde++;
|
PointerPde++;
|
||||||
PointerPte = MiPteToAddress(PointerPde);
|
PointerPte = MiPdeToPte(PointerPde);
|
||||||
|
|
||||||
/* Is the entire VAD committed? If not, fail */
|
/* Is the entire VAD committed? If not, fail */
|
||||||
if (!Vad->u.VadFlags.MemCommit) return FALSE;
|
if (!Vad->u.VadFlags.MemCommit) return FALSE;
|
||||||
|
|
||||||
/* Everything is committed so far past the range, return true */
|
/* New loop iteration with our new, on-boundary PTE. */
|
||||||
if (PointerPte > LastPte) return TRUE;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue