- Fix a crazy bug in KiTrap0EHandler, it didn't enable interrupts unless it trapped when interrupts were already disabled (during a page fault during page fault handling, for example). This seems to have worked because the old non-newcc version of MiReadPage appears to rely on a page fault to bring the paged out page in. Thanks Timo.

svn path=/trunk/; revision=56234
This commit is contained in:
Stefan Ginsberg 2012-03-26 13:00:16 +00:00
parent e51701633a
commit 0d198933fd

View file

@ -1183,27 +1183,23 @@ KiTrap0EHandler(IN PKTRAP_FRAME TrapFrame)
while (TRUE);
}
}
/* Save CR2 */
Cr2 = __readcr2();
/* HACK: Check if interrupts are disabled and enable them */
/* Enable interupts */
_enable();
/* Check if we faulted with interrupts disabled */
if (!(TrapFrame->EFlags & EFLAGS_INTERRUPT_MASK))
{
/* Enable interupts */
_enable();
#ifdef HACK_ABOVE_FIXED
if (!(TrapFrame->EFlags & EFLAGS_INTERRUPT_MASK))
{
/* This is illegal */
KeBugCheckWithTf(IRQL_NOT_LESS_OR_EQUAL,
Cr2,
-1,
TrapFrame->ErrCode & 2 ? TRUE : FALSE,
TrapFrame->Eip,
TrapFrame);
}
#endif
/* This is completely illegal, bugcheck the system */
KeBugCheckWithTf(IRQL_NOT_LESS_OR_EQUAL,
Cr2,
-1,
TrapFrame->ErrCode & 2 ? TRUE : FALSE,
TrapFrame->Eip,
TrapFrame);
}
/* Check for S-LIST fault in kernel mode */