Commit 28f797ec authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winebus.sys: Read irp->IoStatus.Status before leaving the CS.

Or we may have a race condition where a pending IRP may be completed after we left the CS but before we read its status. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent faaad364
......@@ -982,9 +982,9 @@ static NTSTATUS WINAPI hid_internal_dispatch(DEVICE_OBJECT *device, IRP *irp)
break;
}
status = irp->IoStatus.Status;
LeaveCriticalSection(&ext->cs);
status = irp->IoStatus.Status;
if (status != STATUS_PENDING) IoCompleteRequest(irp, IO_NO_INCREMENT);
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