зеркало из https://github.com/microsoft/msquic.git
Fix QuicTraceRundown Race Condition (#2915)
This commit is contained in:
Родитель
6583df53c0
Коммит
d50ee4b831
|
@ -65,6 +65,7 @@ MsQuicConnectionOpen(
|
|||
QuicConnAlloc(
|
||||
Registration,
|
||||
NULL,
|
||||
NULL,
|
||||
&Connection);
|
||||
if (QUIC_FAILED(Status)) {
|
||||
goto Error;
|
||||
|
@ -73,8 +74,6 @@ MsQuicConnectionOpen(
|
|||
Connection->ClientCallbackHandler = Handler;
|
||||
Connection->ClientContext = Context;
|
||||
|
||||
QuicRegistrationQueueNewConnection(Registration, Connection);
|
||||
|
||||
*NewConnection = (HQUIC)Connection;
|
||||
Status = QUIC_STATUS_SUCCESS;
|
||||
|
||||
|
|
|
@ -1289,6 +1289,7 @@ QuicBindingCreateConnection(
|
|||
QUIC_STATUS Status =
|
||||
QuicConnAlloc(
|
||||
MsQuicLib.StatelessRegistration,
|
||||
Worker,
|
||||
Datagram,
|
||||
&NewConnection);
|
||||
if (QUIC_FAILED(Status)) {
|
||||
|
@ -1296,8 +1297,6 @@ QuicBindingCreateConnection(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
QuicWorkerAssignConnection(Worker, NewConnection);
|
||||
|
||||
BOOLEAN BindingRefAdded = FALSE;
|
||||
CXPLAT_DBG_ASSERT(NewConnection->SourceCids.Next != NULL);
|
||||
QUIC_CID_HASH_ENTRY* SourceCid =
|
||||
|
|
|
@ -57,6 +57,7 @@ _Success_(return == QUIC_STATUS_SUCCESS)
|
|||
QUIC_STATUS
|
||||
QuicConnAlloc(
|
||||
_In_ QUIC_REGISTRATION* Registration,
|
||||
_In_opt_ QUIC_WORKER* Worker,
|
||||
_In_opt_ const CXPLAT_RECV_DATA* const Datagram,
|
||||
_Outptr_ _At_(*NewConnection, __drv_allocatesMem(Mem))
|
||||
QUIC_CONNECTION** NewConnection
|
||||
|
@ -262,6 +263,9 @@ QuicConnAlloc(
|
|||
}
|
||||
|
||||
QuicPathValidate(Path);
|
||||
if (Worker != NULL) {
|
||||
QuicWorkerAssignConnection(Worker, Connection);
|
||||
}
|
||||
if (!QuicConnRegister(Connection, Registration)) {
|
||||
Status = QUIC_STATUS_INVALID_STATE;
|
||||
goto Error;
|
||||
|
@ -572,6 +576,9 @@ QuicConnRegister(
|
|||
CxPlatDispatchLockAcquire(&Registration->ConnectionLock);
|
||||
RegistrationShuttingDown = Registration->ShuttingDown;
|
||||
if (!RegistrationShuttingDown) {
|
||||
if (Connection->Worker == NULL) {
|
||||
QuicRegistrationQueueNewConnection(Registration, Connection);
|
||||
}
|
||||
CxPlatListInsertTail(&Registration->Connections, &Connection->RegistrationLink);
|
||||
}
|
||||
CxPlatDispatchLockRelease(&Registration->ConnectionLock);
|
||||
|
|
|
@ -957,6 +957,7 @@ _Success_(return == QUIC_STATUS_SUCCESS)
|
|||
QUIC_STATUS
|
||||
QuicConnAlloc(
|
||||
_In_ QUIC_REGISTRATION* Registration,
|
||||
_In_opt_ QUIC_WORKER* Worker,
|
||||
_In_opt_ const CXPLAT_RECV_DATA* const Datagram,
|
||||
_Outptr_ _At_(*NewConnection, __drv_allocatesMem(Mem))
|
||||
QUIC_CONNECTION** NewConnection
|
||||
|
|
|
@ -381,7 +381,7 @@ QuicRegistrationSettingsChanged(
|
|||
CxPlatLockRelease(&Registration->ConfigLock);
|
||||
}
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
BOOLEAN
|
||||
QuicRegistrationAcceptConnection(
|
||||
_In_ QUIC_REGISTRATION* Registration,
|
||||
|
|
|
@ -136,7 +136,7 @@ QuicRegistrationSettingsChanged(
|
|||
// Determines whether this new connection can be accepted by the registration
|
||||
// or not.
|
||||
//
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
_IRQL_requires_max_(DISPATCH_LEVEL)
|
||||
BOOLEAN
|
||||
QuicRegistrationAcceptConnection(
|
||||
_In_ QUIC_REGISTRATION* Registration,
|
||||
|
|
Загрузка…
Ссылка в новой задаче