mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 10:46:58 +00:00
[NTOS/x64] Gracefully handle invalid Vector in KeConnectInterrupt
Fail instead of asserting. This is needed because a kmtest triggers it.
This commit is contained in:
parent
2320c37151
commit
2ce5d43a33
1 changed files with 8 additions and 2 deletions
|
@ -84,8 +84,14 @@ KeConnectInterrupt(IN PKINTERRUPT Interrupt)
|
||||||
PKINTERRUPT ConnectedInterrupt;
|
PKINTERRUPT ConnectedInterrupt;
|
||||||
KIRQL OldIrql;
|
KIRQL OldIrql;
|
||||||
|
|
||||||
ASSERT(Interrupt->Vector >= PRIMARY_VECTOR_BASE);
|
/* Validate the vector */
|
||||||
ASSERT(Interrupt->Vector <= MAXIMUM_IDTVECTOR);
|
if ((Interrupt->Vector < PRIMARY_VECTOR_BASE) ||
|
||||||
|
(Interrupt->Vector > MAXIMUM_IDTVECTOR))
|
||||||
|
{
|
||||||
|
DPRINT1("Invalid interrupt vector: %lu\n", Interrupt->Vector);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
ASSERT(Interrupt->Number < KeNumberProcessors);
|
ASSERT(Interrupt->Number < KeNumberProcessors);
|
||||||
ASSERT(Interrupt->Irql <= HIGH_LEVEL);
|
ASSERT(Interrupt->Irql <= HIGH_LEVEL);
|
||||||
ASSERT(Interrupt->SynchronizeIrql >= Interrupt->Irql);
|
ASSERT(Interrupt->SynchronizeIrql >= Interrupt->Irql);
|
||||||
|
|
Loading…
Reference in a new issue