From: Thomas Faber Date: Wed, 6 Mar 2019 08:23:26 +0000 (+0100) Subject: [USBPORT] Acquire EndpointSpinLock in addition to MiniportSpinLock in USBPORT_ReopenPipe. X-Git-Tag: 0.4.13-dev~234 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=1946f6bb251aba0e10943989e23cf2d151977d3f [USBPORT] Acquire EndpointSpinLock in addition to MiniportSpinLock in USBPORT_ReopenPipe. --- diff --git a/drivers/usb/usbport/endpoint.c b/drivers/usb/usbport/endpoint.c index c1624ec297f..40efddf1652 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);