From deb9c5416f493cdd0de9ce69ff7e39bffe7e34f7 Mon Sep 17 00:00:00 2001 From: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> Date: Mon, 23 Oct 2017 21:18:27 +0200 Subject: [PATCH] CORE-13048. [I8042PRT] keyboard.c: Restore 1 "Irql =" (which was lost in r30000). (#63) [I8042PRT] Restore 1 "Irql =" (which was lost in r30000). CORE-13048 --- drivers/input/i8042prt/keyboard.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/i8042prt/keyboard.c b/drivers/input/i8042prt/keyboard.c index e007d289b87..198ec8f35d7 100644 --- a/drivers/input/i8042prt/keyboard.c +++ b/drivers/input/i8042prt/keyboard.c @@ -369,7 +369,10 @@ i8042KbdDpcRoutine( DeviceExtension->KeyboardBuffer + KeysInBufferCopy, &KeysTransferred); - KeAcquireInterruptSpinLock(PortDeviceExtension->HighestDIRQLInterrupt); + /* Validate that the callback didn't change the Irql. */ + ASSERT(KeGetCurrentIrql() == Irql); + + Irql = KeAcquireInterruptSpinLock(PortDeviceExtension->HighestDIRQLInterrupt); DeviceExtension->KeysInBuffer -= KeysTransferred; KeReleaseInterruptSpinLock(PortDeviceExtension->HighestDIRQLInterrupt, Irql); }