From 5547b747179b163bcb115f58f256c27b8552497c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sun, 22 Sep 2024 21:43:10 +0200 Subject: [PATCH] [NTOS:KD64] Fix freezes on first chance exception when KDBG is enabled and KdIgnoreUmExceptions is TRUE This fixes the following use case: - Execute 'kdbgctrl.exe -du' - Execute 'kdbgctrl.exe -cu' - See that last command never finishes --- ntoskrnl/kd64/kdtrap.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ntoskrnl/kd64/kdtrap.c b/ntoskrnl/kd64/kdtrap.c index 4cfac2b04b0..8af25e3429f 100644 --- a/ntoskrnl/kd64/kdtrap.c +++ b/ntoskrnl/kd64/kdtrap.c @@ -318,7 +318,6 @@ KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN KPROCESSOR_MODE PreviousMode) { -#ifdef _WINKD_ /* * Determine if this is a valid debug service call and make sure that * it isn't a software breakpoint @@ -335,8 +334,4 @@ KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord, /* We don't have to handle it */ return FALSE; } -#else - /* KDBG has its own mechanism for ignoring user mode exceptions */ - return FALSE; -#endif }