Use the irql assigned by IoAcquireCancelSpinLock, not the (yet-to-be-assigned) irp->CancelIrql.
This is for readability. Since IoReleaseCancelSpinLock() ignores the IRQL argument anyway, no semantic change is expected with unmodified ntoskrnl.exe/hal.dll.
-- v2: ntoskrnl.exe: Fix IRQL mismatch between cancel spin lock acquire and release.
From: Jinoh Kang jinoh.kang.kr@gmail.com
Use the irql assigned by IoAcquireCancelSpinLock, not the (yet-to-be-assigned) irp->CancelIrql.
This is for readability. Since IoReleaseCancelSpinLock() ignores the IRQL argument anyway, no semantic change is expected with unmodified ntoskrnl.exe/hal.dll. --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index a375cd078b5..7d08ed06444 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2122,7 +2122,7 @@ BOOLEAN WINAPI IoCancelIrp( IRP *irp ) irp->Cancel = TRUE; if (!(cancel_routine = IoSetCancelRoutine( irp, NULL ))) { - IoReleaseCancelSpinLock( irp->CancelIrql ); + IoReleaseCancelSpinLock( irql ); return FALSE; }