Commit d0d1601e authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntoskrnl.exe/tests: Avoid race condition in test driver.

Might fix random driver crash on testbot Win8 machine. Signed-off-by: 's avatarPaul Gofman <pgofman@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 8d7c39b8
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment