[USBPORT] Acquire EndpointSpinLock in addition to MiniportSpinLock in USBPORT_ReopenPipe.

This commit is contained in:
Thomas Faber 2019-03-06 09:23:26 +01:00
parent e47240fb37
commit 1946f6bb25
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -1186,13 +1186,15 @@ USBPORT_ReopenPipe(IN PDEVICE_OBJECT FdoDevice,
USBPORT_Wait(FdoDevice, 1); USBPORT_Wait(FdoDevice, 1);
} }
KeAcquireSpinLock(&FdoExtension->MiniportSpinLock, &MiniportOldIrql); KeAcquireSpinLock(&Endpoint->EndpointSpinLock, &Endpoint->EndpointOldIrql);
KeAcquireSpinLockAtDpcLevel(&FdoExtension->MiniportSpinLock);
Packet->SetEndpointState(FdoExtension->MiniPortExt, Packet->SetEndpointState(FdoExtension->MiniPortExt,
Endpoint + 1, Endpoint + 1,
USBPORT_ENDPOINT_REMOVE); USBPORT_ENDPOINT_REMOVE);
KeReleaseSpinLock(&FdoExtension->MiniportSpinLock, MiniportOldIrql); KeReleaseSpinLockFromDpcLevel(&FdoExtension->MiniportSpinLock);
KeReleaseSpinLock(&Endpoint->EndpointSpinLock, Endpoint->EndpointOldIrql);
USBPORT_Wait(FdoDevice, 2); USBPORT_Wait(FdoDevice, 2);