https://git.reactos.org/?p=reactos.git;a=commitdiff;h=41de1bd7241f3ce1b2020…
commit 41de1bd7241f3ce1b2020259161e534f1efa6433
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Fri May 21 09:41:27 2021 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Mon Jun 21 11:42:01 2021 +0200
[NTOS:KE] Do not allow waiting at IRQL >= DISPATCH_LEVEL when providing a timeout
in KeWaitForMultipleObjects
CORE-6473
---
ntoskrnl/ke/wait.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/ntoskrnl/ke/wait.c b/ntoskrnl/ke/wait.c
index 3863b8e4779..26869fdd7de 100644
--- a/ntoskrnl/ke/wait.c
+++ b/ntoskrnl/ke/wait.c
@@ -605,12 +605,9 @@ KeWaitForMultipleObjects(IN ULONG Count,
if (Thread->WaitNext)
ASSERT(KeGetCurrentIrql() == SYNCH_LEVEL);
- else if (KeGetCurrentIrql() == DISPATCH_LEVEL &&
- (!Timeout || Timeout->QuadPart != 0))
+ else if (!Timeout || (Timeout->QuadPart != 0))
{
- /* HACK: tcpip is broken and waits with spinlocks acquired (CORE-6473) */
- DPRINT("%s called at DISPATCH_LEVEL with non-zero timeout!\n",
- __FUNCTION__);
+ ASSERT(KeGetCurrentIrql() <= APC_LEVEL);
}
else
ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL);