mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[NTOS]
- 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:
parent
e51701633a
commit
0d198933fd
1 changed files with 13 additions and 17 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue