https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fc14c095f58d7d9174913…
commit fc14c095f58d7d917491367e12af514743753c7f
Author: Victor Perevertkin <victor(a)perevertkin.ru>
AuthorDate: Thu Aug 1 21:17:44 2019 +0300
Commit: Victor Perevertkin <victor(a)perevertkin.ru>
CommitDate: Tue Aug 20 01:30:52 2019 +0300
[USBPORT] Fix endless loop, occasionally happened on real hardware
---
drivers/usb/usbport/queue.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/usbport/queue.c b/drivers/usb/usbport/queue.c
index 9635de1ef8f..df70e5f0286 100644
--- a/drivers/usb/usbport/queue.c
+++ b/drivers/usb/usbport/queue.c
@@ -1261,7 +1261,7 @@ USBPORT_FlushController(IN PDEVICE_OBJECT FdoDevice)
PUSBPORT_DEVICE_EXTENSION FdoExtension;
PLIST_ENTRY Entry;
PUSBPORT_ENDPOINT Endpoint;
- ULONG KilledTransfers = 0;
+ ULONG KilledTransfers;
PLIST_ENTRY EndpointList;
KIRQL OldIrql;
LIST_ENTRY FlushList;
@@ -1301,6 +1301,7 @@ USBPORT_FlushController(IN PDEVICE_OBJECT FdoDevice)
KeReleaseSpinLock(&FdoExtension->EndpointListSpinLock, OldIrql);
+ KilledTransfers = 0;
while (!IsListEmpty(&FlushList))
{
Endpoint = CONTAINING_RECORD(FlushList.Flink,
@@ -1355,7 +1356,7 @@ USBPORT_AbortEndpoint(IN PDEVICE_OBJECT FdoDevice,
IN PIRP Irp)
{
PLIST_ENTRY PendingList;
- PUSBPORT_TRANSFER PendingTransfer;
+ PUSBPORT_TRANSFER PendingTransfer;
PLIST_ENTRY ActiveList;
PUSBPORT_TRANSFER ActiveTransfer;