mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
Broaden a lock to prevent a race for completion of the receive IRP. Fixes
some crashes while receiving from a fast remote host under load. svn path=/trunk/; revision=24726
This commit is contained in:
parent
250bddf673
commit
4f1dd7e361
1 changed files with 7 additions and 1 deletions
|
@ -796,6 +796,9 @@ NTSTATUS DispTdiReceive(
|
||||||
TI_DbgPrint(MID_TRACE,("TCPIP<<< Got an MDL: %x\n", Irp->MdlAddress));
|
TI_DbgPrint(MID_TRACE,("TCPIP<<< Got an MDL: %x\n", Irp->MdlAddress));
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
/* Lock here so we're sure we've got the following 'mark pending' */
|
||||||
|
TcpipRecursiveMutexEnter( &TCPLock, TRUE );
|
||||||
|
|
||||||
Status = TCPReceiveData(
|
Status = TCPReceiveData(
|
||||||
TranContext->Handle.ConnectionContext,
|
TranContext->Handle.ConnectionContext,
|
||||||
(PNDIS_BUFFER)Irp->MdlAddress,
|
(PNDIS_BUFFER)Irp->MdlAddress,
|
||||||
|
@ -807,10 +810,13 @@ NTSTATUS DispTdiReceive(
|
||||||
if (Status != STATUS_PENDING)
|
if (Status != STATUS_PENDING)
|
||||||
{
|
{
|
||||||
DispDataRequestComplete(Irp, Status, BytesReceived);
|
DispDataRequestComplete(Irp, Status, BytesReceived);
|
||||||
} else
|
} else {
|
||||||
IoMarkIrpPending(Irp);
|
IoMarkIrpPending(Irp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TcpipRecursiveMutexLeave( &TCPLock );
|
||||||
|
}
|
||||||
|
|
||||||
TI_DbgPrint(DEBUG_IRP, ("Leaving. Status is (0x%X)\n", Status));
|
TI_DbgPrint(DEBUG_IRP, ("Leaving. Status is (0x%X)\n", Status));
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Reference in a new issue