CORE-13048. [I8042PRT] keyboard.c: Restore 1 "Irql =" (which was lost in r30000)...
authorSerge Gautherie <32623169+SergeGautherie@users.noreply.github.com>
Mon, 23 Oct 2017 19:18:27 +0000 (21:18 +0200)
committerThomas Faber <ThFabba@users.noreply.github.com>
Mon, 23 Oct 2017 19:18:27 +0000 (21:18 +0200)
[I8042PRT] Restore 1 "Irql =" (which was lost in r30000). CORE-13048

drivers/input/i8042prt/keyboard.c

index e007d28..198ec8f 100644 (file)
@@ -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);
 }