summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Molenhouse <[email protected]>2022-03-02 04:23:04 -0800
committerTom Molenhouse <[email protected]>2022-03-02 04:23:04 -0800
commitf1969c37da5f879331ffb411667e34ce89f1c636 (patch)
tree02a998f6f198b3464a5269127c7acafc4fa47370
parent9f03207ae1e8df83325f067de84494ae55ab5e97 (diff)
Replace ExAllocatePool* with ExAllocatePool2
-rw-r--r--network/ndis/extension/base/SxBase.c10
-rw-r--r--network/ndis/extension/base/SxLibrary.c42
-rw-r--r--network/ndis/extension/samples/forward/MsForwardExt.c18
3 files changed, 35 insertions, 35 deletions
diff --git a/network/ndis/extension/base/SxBase.c b/network/ndis/extension/base/SxBase.c
index f3a9de11..f45f8b79 100644
--- a/network/ndis/extension/base/SxBase.c
+++ b/network/ndis/extension/base/SxBase.c
@@ -238,9 +238,9 @@ SxNdisAttach(
}
switchObjectSize = sizeof(SX_SWITCH_OBJECT);
- switchObject = ExAllocatePoolWithTag(NonPagedPoolNx,
- switchObjectSize,
- SxExtAllocationTag);
+ switchObject = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ switchObjectSize,
+ SxExtAllocationTag);
if (switchObject == NULL)
{
@@ -1256,8 +1256,8 @@ SxpNdisProcessMethodOid(
ASSERT(Switch->OldNicRequest == NULL);
Switch->OldNicRequest = nicOidRequest;
- newNicOidRequest = (PNDIS_SWITCH_NIC_OID_REQUEST)ExAllocatePoolWithTag(
- NonPagedPoolNx,
+ newNicOidRequest = (PNDIS_SWITCH_NIC_OID_REQUEST)ExAllocatePool2(
+ POOL_FLAG_NON_PAGED,
sizeof(NDIS_SWITCH_NIC_OID_REQUEST),
SxExtAllocationTag);
diff --git a/network/ndis/extension/base/SxLibrary.c b/network/ndis/extension/base/SxLibrary.c
index ea2f53b6..c4b12d45 100644
--- a/network/ndis/extension/base/SxLibrary.c
+++ b/network/ndis/extension/base/SxLibrary.c
@@ -333,9 +333,9 @@ SxLibIssueOidRequest(
// Dynamically allocate filter request so that we can handle asynchronous
// completion.
//
- oidRequest = (PSX_OID_REQUEST)ExAllocatePoolWithTag(NonPagedPoolNx,
- sizeof(SX_OID_REQUEST),
- SxExtAllocationTag);
+ oidRequest = (PSX_OID_REQUEST)ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ sizeof(SX_OID_REQUEST),
+ SxExtAllocationTag);
if (oidRequest == NULL)
{
goto Cleanup;
@@ -469,9 +469,9 @@ SxLibGetPortArrayUnsafe(
if (BytesNeeded != 0)
{
arrayLength = BytesNeeded;
- portArray = ExAllocatePoolWithTag(NonPagedPoolNx,
- arrayLength,
- SxExtAllocationTag);
+ portArray = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ arrayLength,
+ SxExtAllocationTag);
if (portArray == NULL)
{
@@ -529,9 +529,9 @@ SxLibGetNicArrayUnsafe(
if (BytesNeeded != 0)
{
arrayLength = BytesNeeded;
- nicArray = ExAllocatePoolWithTag(NonPagedPoolNx,
- arrayLength,
- SxExtAllocationTag);
+ nicArray = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ arrayLength,
+ SxExtAllocationTag);
if (nicArray == NULL)
{
@@ -602,9 +602,9 @@ SxLibGetSwitchPropertyUnsafe(
ASSERT(PropertyType != NdisSwitchPropertyTypeCustom);
}
- outputBuffer = ExAllocatePoolWithTag(NonPagedPoolNx,
- outputBufferLength,
- SxExtAllocationTag);
+ outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ outputBufferLength,
+ SxExtAllocationTag);
if (outputBuffer == NULL)
{
@@ -619,9 +619,9 @@ SxLibGetSwitchPropertyUnsafe(
ExFreePoolWithTag(outputBuffer, SxExtAllocationTag);
outputBufferLength = (USHORT)bytesNeeded;
- outputBuffer = ExAllocatePoolWithTag(NonPagedPoolNx,
- outputBufferLength,
- SxExtAllocationTag);
+ outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ outputBufferLength,
+ SxExtAllocationTag);
if (outputBuffer == NULL)
{
@@ -698,9 +698,9 @@ SxLibGetPortPropertyUnsafe(
ASSERT(PropertyType != NdisSwitchPortPropertyTypeCustom);
}
- outputBuffer = ExAllocatePoolWithTag(NonPagedPoolNx,
- outputBufferLength,
- SxExtAllocationTag);
+ outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ outputBufferLength,
+ SxExtAllocationTag);
if (outputBuffer == NULL)
{
@@ -715,9 +715,9 @@ SxLibGetPortPropertyUnsafe(
ExFreePoolWithTag(outputBuffer, SxExtAllocationTag);
outputBufferLength = (USHORT)bytesNeeded;
- outputBuffer = ExAllocatePoolWithTag(NonPagedPoolNx,
- outputBufferLength,
- SxExtAllocationTag);
+ outputBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ outputBufferLength,
+ SxExtAllocationTag);
if (outputBuffer == NULL)
{
diff --git a/network/ndis/extension/samples/forward/MsForwardExt.c b/network/ndis/extension/samples/forward/MsForwardExt.c
index bf6d337a..cabd6401 100644
--- a/network/ndis/extension/samples/forward/MsForwardExt.c
+++ b/network/ndis/extension/samples/forward/MsForwardExt.c
@@ -95,9 +95,9 @@ Routine Description:
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
PMSFORWARD_CONTEXT switchContext;
- switchContext = ExAllocatePoolWithTag(NonPagedPoolNx,
- sizeof(MSFORWARD_CONTEXT),
- SxExtAllocationTag);
+ switchContext = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ sizeof(MSFORWARD_CONTEXT),
+ SxExtAllocationTag);
if (switchContext == NULL)
{
@@ -1879,9 +1879,9 @@ Routine Description:
if (nicEntry == NULL)
{
- nicEntry = ExAllocatePoolWithTag(NonPagedPoolNx,
- sizeof(MSFORWARD_NIC_LIST_ENTRY),
- SxExtAllocationTag);
+ nicEntry = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ sizeof(MSFORWARD_NIC_LIST_ENTRY),
+ SxExtAllocationTag);
if (nicEntry == NULL)
{
@@ -1937,9 +1937,9 @@ Routine Description:
if (newPolicy == NULL)
{
- newPolicy = ExAllocatePoolWithTag(NonPagedPoolNx,
- sizeof(MSFORWARD_MAC_POLICY_LIST_ENTRY),
- SxExtAllocationTag);
+ newPolicy = ExAllocatePool2(POOL_FLAG_NON_PAGED,
+ sizeof(MSFORWARD_MAC_POLICY_LIST_ENTRY),
+ SxExtAllocationTag);
if (newPolicy == NULL)
{