[NTOS:KD] Release lock before calling KdpPrint

Avoiding resursive spinlock acquisition
This commit is contained in:
Jérôme Gardou
2021-06-29 11:49:20 +02:00
committed by Jérôme Gardou
parent 608032bd08
commit 79c2972035
+3 -3
View File
@@ -772,6 +772,9 @@ KdReceivePacket(
OldIrql = KdpAcquireLock(&KdpSerialSpinLock);
}
/* Release the spinlock */
KdpReleaseLock(&KdpSerialSpinLock, OldIrql);
/* Print a new line */
*StringChar.Buffer = '\n';
KdpPrintString(&StringChar);
@@ -783,9 +786,6 @@ KdReceivePacket(
if (!(KdbDebugState & KD_DEBUG_KDSERIAL))
KbdEnableMouse();
/* Release the spinlock */
KdpReleaseLock(&KdpSerialSpinLock, OldIrql);
#endif
return KdPacketReceived;
}