https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1946f6bb251aba0e109439...
commit 1946f6bb251aba0e10943989e23cf2d151977d3f Author: Thomas Faber thomas.faber@reactos.org AuthorDate: Wed Mar 6 09:23:26 2019 +0100 Commit: Thomas Faber thomas.faber@reactos.org CommitDate: Mon Mar 11 08:53:52 2019 +0100
[USBPORT] Acquire EndpointSpinLock in addition to MiniportSpinLock in USBPORT_ReopenPipe. --- drivers/usb/usbport/endpoint.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/usbport/endpoint.c b/drivers/usb/usbport/endpoint.c index c1624ec297..40efddf165 100644 --- a/drivers/usb/usbport/endpoint.c +++ b/drivers/usb/usbport/endpoint.c @@ -1186,13 +1186,15 @@ USBPORT_ReopenPipe(IN PDEVICE_OBJECT FdoDevice, USBPORT_Wait(FdoDevice, 1); }
- KeAcquireSpinLock(&FdoExtension->MiniportSpinLock, &MiniportOldIrql); + KeAcquireSpinLock(&Endpoint->EndpointSpinLock, &Endpoint->EndpointOldIrql); + KeAcquireSpinLockAtDpcLevel(&FdoExtension->MiniportSpinLock);
Packet->SetEndpointState(FdoExtension->MiniPortExt, Endpoint + 1, USBPORT_ENDPOINT_REMOVE);
- KeReleaseSpinLock(&FdoExtension->MiniportSpinLock, MiniportOldIrql); + KeReleaseSpinLockFromDpcLevel(&FdoExtension->MiniportSpinLock); + KeReleaseSpinLock(&Endpoint->EndpointSpinLock, Endpoint->EndpointOldIrql);
USBPORT_Wait(FdoDevice, 2);