mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 05:22:59 +00:00
[USBPORT] Release StateChangeSpinLock before acquiring MiniportSpinLock.
Found by Driver Verifier.
This commit is contained in:
parent
267f5633ee
commit
e47240fb37
1 changed files with 5 additions and 1 deletions
|
@ -1252,6 +1252,7 @@ USBPORT_ReopenPipe(IN PDEVICE_OBJECT FdoDevice,
|
||||||
|
|
||||||
if (Endpoint->StateLast == USBPORT_ENDPOINT_ACTIVE)
|
if (Endpoint->StateLast == USBPORT_ENDPOINT_ACTIVE)
|
||||||
{
|
{
|
||||||
|
KeReleaseSpinLockFromDpcLevel(&Endpoint->StateChangeSpinLock);
|
||||||
KeAcquireSpinLockAtDpcLevel(&FdoExtension->MiniportSpinLock);
|
KeAcquireSpinLockAtDpcLevel(&FdoExtension->MiniportSpinLock);
|
||||||
|
|
||||||
Packet->SetEndpointState(FdoExtension->MiniPortExt,
|
Packet->SetEndpointState(FdoExtension->MiniPortExt,
|
||||||
|
@ -1260,8 +1261,11 @@ USBPORT_ReopenPipe(IN PDEVICE_OBJECT FdoDevice,
|
||||||
|
|
||||||
KeReleaseSpinLockFromDpcLevel(&FdoExtension->MiniportSpinLock);
|
KeReleaseSpinLockFromDpcLevel(&FdoExtension->MiniportSpinLock);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
KeReleaseSpinLockFromDpcLevel(&Endpoint->StateChangeSpinLock);
|
||||||
|
}
|
||||||
|
|
||||||
KeReleaseSpinLockFromDpcLevel(&Endpoint->StateChangeSpinLock);
|
|
||||||
KeReleaseSpinLock(&Endpoint->EndpointSpinLock, Endpoint->EndpointOldIrql);
|
KeReleaseSpinLock(&Endpoint->EndpointSpinLock, Endpoint->EndpointOldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue