diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 14b5a1a676f..df8c4c1e2f9 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -602,7 +602,9 @@ static void dispatch_irp( DEVICE_OBJECT *device, IRP *irp, struct dispatch_conte context->irp = irp; device->CurrentIrp = irp; + KeEnterCriticalRegion(); IoCallDriver( device, irp ); + KeLeaveCriticalRegion(); device->CurrentIrp = NULL; } diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 69a7d78657d..b61e970b0aa 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -386,7 +386,6 @@ static void test_critical_region(BOOL is_dispatcher) KeLeaveCriticalRegion(); result = KeAreApcsDisabled(); - todo_wine_if(is_dispatcher) ok(result == is_dispatcher || broken(is_dispatcher && !result), "KeAreApcsDisabled returned %x\n", result); }