ntoskrnl.exe/tests: Avoid race condition in test driver.
Might fix random driver crash on testbot Win8 machine. Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8d7c39b860
commit
d0d1601e6c
|
@ -2194,7 +2194,9 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
|
|||
main_test_work_item = IoAllocateWorkItem(lower_device);
|
||||
ok(main_test_work_item != NULL, "main_test_work_item = NULL\n");
|
||||
|
||||
IoMarkIrpPending(irp);
|
||||
IoQueueWorkItem(main_test_work_item, main_test_task, DelayedWorkQueue, irp);
|
||||
|
||||
return STATUS_PENDING;
|
||||
}
|
||||
|
||||
|
@ -2380,7 +2382,6 @@ static NTSTATUS WINAPI driver_IoControl(DEVICE_OBJECT *device, IRP *irp)
|
|||
irp->IoStatus.Status = status;
|
||||
IoCompleteRequest(irp, IO_NO_INCREMENT);
|
||||
}
|
||||
else IoMarkIrpPending(irp);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue