Don't forget to set RX_CONTEXT_FLAG_FROM_POOL flag when allocating a new RX_CONTEXT structure from pool.
This avoids leaking it afterwards and exhausting NP pool when using NFS.

CORE-8204
CORE-11327
CORE-13484
CORE-13604

svn path=/trunk/; revision=75442
This commit is contained in:
Pierre Schweitzer 2017-07-30 08:22:34 +00:00
parent 0eacafad27
commit a128acd13b

View file

@ -1752,8 +1752,12 @@ RxCreateRxContext(
return NULL;
}
/* And initialize it */
/* Zero it */
RtlZeroMemory(Context, sizeof(RX_CONTEXT));
/* It was allocated on NP pool, keep track of it! */
SetFlag(Context->Flags, RX_CONTEXT_FLAG_FROM_POOL);
/* And initialize it */
RxInitializeContext(Irp, RxDeviceObject, InitialContextFlags, Context);
ASSERT((Context->MajorFunction != IRP_MJ_CREATE) || !BooleanFlagOn(Context->Flags, RX_CONTEXT_FLAG_MUST_SUCCEED_ALLOCATED));