[ACPI]
authorThomas Faber <thomas.faber@reactos.org>
Fri, 27 Mar 2015 17:20:03 +0000 (17:20 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 27 Mar 2015 17:20:03 +0000 (17:20 +0000)
- Use more sensible pool tags
[NULL]
- Use pool tagging

svn path=/trunk/; revision=66920

reactos/drivers/base/null/null.c
reactos/drivers/bus/acpi/acpienum.c
reactos/drivers/bus/acpi/busmgr/bus.c
reactos/drivers/bus/acpi/buspdo.c
reactos/drivers/bus/acpi/eval.c
reactos/drivers/bus/acpi/main.c
reactos/drivers/bus/acpi/osl.c
reactos/drivers/bus/acpi/pnp.c

index 3ba9d18..610e886 100644 (file)
@@ -9,7 +9,7 @@
 
 /* INCLUDES ******************************************************************/
 
-#include <ntddk.h>
+#include <wdm.h>
 
 /* FUNCTIONS *****************************************************************/
 
@@ -183,7 +183,9 @@ DriverEntry(IN PDRIVER_OBJECT DriverObject,
     DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] = NullDispatch;
 
     /* Allocate the fast I/O dispatch table */
-    FastIoDispatch = ExAllocatePool(NonPagedPool, sizeof(FAST_IO_DISPATCH));
+    FastIoDispatch = ExAllocatePoolWithTag(NonPagedPool,
+                                           sizeof(FAST_IO_DISPATCH),
+                                           'llun');
     if (!FastIoDispatch)
     {
         /* Failed, cleanup */
index d258b45..9097f3c 100644 (file)
@@ -118,7 +118,7 @@ Bus_PlugInDevice (
                index++;
                temp[++index] = UNICODE_NULL;
 
-               pdoData->HardwareIDs  = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'IPCA');
+               pdoData->HardwareIDs = ExAllocatePoolWithTag(NonPagedPool, index*sizeof(WCHAR), 'DpcA');
 
 
     if (!pdoData->HardwareIDs) {
index cbc240e..2706dd3 100644 (file)
@@ -465,7 +465,7 @@ acpi_bus_generate_event_dpc(PKDPC Dpc,
     ULONG_PTR TypeData = (ULONG_PTR)SystemArgument2;
        KIRQL OldIrql;
 
-    event = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_bus_event), 'IPCA');
+    event = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_bus_event), 'epcA');
        if (!event)
                return;
 
@@ -549,7 +549,7 @@ acpi_bus_receive_event (
 
        memcpy(event, entry, sizeof(struct acpi_bus_event));
 
-       ExFreePoolWithTag(entry, 'IPCA');
+       ExFreePoolWithTag(entry, 'epcA');
        return_VALUE(0);
 }
 
@@ -1147,7 +1147,7 @@ acpi_bus_add (
        if (!child)
                return_VALUE(AE_BAD_PARAMETER);
 
-       device = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_device), 'IPCA');
+       device = ExAllocatePoolWithTag(NonPagedPool,sizeof(struct acpi_device), 'DpcA');
        if (!device) {
                DPRINT1("Memory allocation error\n");
                return_VALUE(-12);
@@ -1263,7 +1263,7 @@ acpi_bus_add (
                        uid = info->UniqueId.String;
                if (info->Valid & ACPI_VALID_CID) {
                        cid_list = &info->CompatibleIdList;
-                       device->pnp.cid_list = ExAllocatePoolWithTag(NonPagedPool,cid_list->ListSize, 'IPCA');
+                       device->pnp.cid_list = ExAllocatePoolWithTag(NonPagedPool,cid_list->ListSize, 'DpcA');
                        if (device->pnp.cid_list)
                                memcpy(device->pnp.cid_list, cid_list, cid_list->ListSize);
                        else
@@ -1326,7 +1326,7 @@ acpi_bus_add (
        }
 
        if (hid) {
-        device->pnp.hardware_id = ExAllocatePoolWithTag(NonPagedPool, strlen(hid) + 1, 'IPCA');
+        device->pnp.hardware_id = ExAllocatePoolWithTag(NonPagedPool, strlen(hid) + 1, 'DpcA');
         if (device->pnp.hardware_id) {
             snprintf(device->pnp.hardware_id, strlen(hid) + 1, "%s", hid);
             device->flags.hardware_id = 1;
@@ -1435,12 +1435,12 @@ acpi_bus_add (
 end:
        if (result) {
                if (device->pnp.cid_list) {
-                       ExFreePoolWithTag(device->pnp.cid_list, 'IPCA');
+                       ExFreePoolWithTag(device->pnp.cid_list, 'DpcA');
                }
         if (device->pnp.hardware_id) {
-            ExFreePoolWithTag(device->pnp.hardware_id, 'IPCA');
+            ExFreePoolWithTag(device->pnp.hardware_id, 'DpcA');
         }
-               ExFreePoolWithTag(device, 'IPCA');
+               ExFreePoolWithTag(device, 'DpcA');
                return_VALUE(result);
        }
        *child = device;
@@ -1461,13 +1461,13 @@ acpi_bus_remove (
        acpi_device_unregister(device);
 
        if (device->pnp.cid_list)
-               ExFreePoolWithTag(device->pnp.cid_list, 'IPCA');
+               ExFreePoolWithTag(device->pnp.cid_list, 'DpcA');
 
     if (device->pnp.hardware_id)
-        ExFreePoolWithTag(device->pnp.hardware_id, 'IPCA');
+        ExFreePoolWithTag(device->pnp.hardware_id, 'DpcA');
 
        if (device)
-               ExFreePoolWithTag(device, 'IPCA');
+               ExFreePoolWithTag(device, 'DpcA');
 
        return_VALUE(0);
 }
index 0f70fac..9c911ab 100644 (file)
@@ -472,7 +472,7 @@ Bus_PDO_QueryDeviceId(
 
         NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
 
-        buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA');
+        buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
 
         if (!buffer) {
            status = STATUS_INSUFFICIENT_RESOURCES;
@@ -511,7 +511,7 @@ Bus_PDO_QueryDeviceId(
 
         NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
 
-        buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof (WCHAR), 'IPCA');
+        buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
         if (!buffer) {
            status = STATUS_INSUFFICIENT_RESOURCES;
            break;
@@ -577,7 +577,7 @@ Bus_PDO_QueryDeviceId(
 
         NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
 
-        buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA');
+        buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
 
         if (!buffer) {
            status = STATUS_INSUFFICIENT_RESOURCES;
@@ -648,7 +648,7 @@ Bus_PDO_QueryDeviceId(
             
             NT_ASSERT(length * sizeof(WCHAR) <= sizeof(temp));
 
-            buffer = ExAllocatePoolWithTag (PagedPool, length * sizeof(WCHAR), 'IPCA');
+            buffer = ExAllocatePoolWithTag(PagedPool, length * sizeof(WCHAR), 'IpcA');
             if (!buffer)
             {
                 status = STATUS_INSUFFICIENT_RESOURCES;
@@ -757,7 +757,7 @@ Bus_PDO_QueryDeviceText(
           else
             Temp = L"Other ACPI device";
 
-            Buffer = ExAllocatePoolWithTag (PagedPool, (wcslen(Temp) + 1) * sizeof(WCHAR), 'IPCA');
+            Buffer = ExAllocatePoolWithTag(PagedPool, (wcslen(Temp) + 1) * sizeof(WCHAR), 'IpcA');
 
             if (!Buffer) {
                 status = STATUS_INSUFFICIENT_RESOURCES;
@@ -833,7 +833,7 @@ Bus_PDO_QueryResources(
         DPRINT("Found PCI root hub: %d\n", BusNumber);
 
         ResourceListSize = sizeof(CM_RESOURCE_LIST);
-        ResourceList = (PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'IPCA');
+        ResourceList = ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'RpcA');
         if (!ResourceList)
             return STATUS_INSUFFICIENT_RESOURCES;
 
@@ -863,7 +863,7 @@ Bus_PDO_QueryResources(
       return Irp->IoStatus.Status;
     }
 
-    Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA');
+    Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'BpcA');
     if (!Buffer.Pointer)
       return STATUS_INSUFFICIENT_RESOURCES;
 
@@ -932,11 +932,11 @@ Bus_PDO_QueryResources(
 
     /* Allocate memory */
     ResourceListSize = sizeof(CM_RESOURCE_LIST) + sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) * (NumberOfResources - 1);
-    ResourceList = (PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'IPCA');
+    ResourceList = ExAllocatePoolWithTag(PagedPool, ResourceListSize, 'RpcA');
 
     if (!ResourceList)
     {
-        ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
+        ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
         return STATUS_INSUFFICIENT_RESOURCES;
     }
     ResourceList->Count = 1;
@@ -1282,7 +1282,7 @@ Bus_PDO_QueryResources(
         resource = ACPI_NEXT_RESOURCE(resource);
     }
 
-    ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
+    ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
     Irp->IoStatus.Information = (ULONG_PTR)ResourceList;
     return STATUS_SUCCESS;
 }
@@ -1335,7 +1335,7 @@ Bus_PDO_QueryResourceRequirements(
             break;
     }
 
-    Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'IPCA');
+    Buffer.Pointer = ExAllocatePoolWithTag(PagedPool, Buffer.Length, 'BpcA');
     if (!Buffer.Pointer)
       return STATUS_INSUFFICIENT_RESOURCES;
 
@@ -1405,11 +1405,11 @@ Bus_PDO_QueryResourceRequirements(
     }
 
     RequirementsListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST) + sizeof(IO_RESOURCE_DESCRIPTOR) * (NumberOfResources - 1);
-    RequirementsList = (PIO_RESOURCE_REQUIREMENTS_LIST)ExAllocatePoolWithTag(PagedPool, RequirementsListSize, 'IPCA');
+    RequirementsList = ExAllocatePoolWithTag(PagedPool, RequirementsListSize, 'RpcA');
 
     if (!RequirementsList)
     {
-        ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
+        ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
         return STATUS_INSUFFICIENT_RESOURCES;
     }
     RequirementsList->ListSize = RequirementsListSize;
@@ -1781,7 +1781,7 @@ Bus_PDO_QueryResourceRequirements(
         }
         resource = ACPI_NEXT_RESOURCE(resource);
     }
-    ExFreePoolWithTag(Buffer.Pointer, 'IPCA');
+    ExFreePoolWithTag(Buffer.Pointer, 'BpcA');
 
     Irp->IoStatus.Information = (ULONG_PTR)RequirementsList;
 
@@ -1846,10 +1846,9 @@ Return Value:
             ASSERTMSG("Someone above is handling TargetDeviceRelation", !deviceRelations);
         }
 
-        deviceRelations = (PDEVICE_RELATIONS)
-                ExAllocatePoolWithTag (PagedPool,
-                                        sizeof(DEVICE_RELATIONS),
-                                        'IPCA');
+        deviceRelations = ExAllocatePoolWithTag(PagedPool,
+                                                sizeof(DEVICE_RELATIONS),
+                                                'IpcA');
         if (!deviceRelations) {
                 status = STATUS_INSUFFICIENT_RESOURCES;
                 break;
@@ -1908,8 +1907,9 @@ Return Value:
 
     PAGED_CODE ();
 
-    busInfo = ExAllocatePoolWithTag (PagedPool, sizeof(PNP_BUS_INFORMATION),
-                                        'IPCA');
+    busInfo = ExAllocatePoolWithTag(PagedPool,
+                                    sizeof(PNP_BUS_INFORMATION),
+                                    'IpcA');
 
     if (busInfo == NULL) {
       return STATUS_INSUFFICIENT_RESOURCES;
index a6456c4..afe3918 100644 (file)
@@ -40,7 +40,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
 
         ParamList.Count = 1;
 
-        ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'IPCA');
+        ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'OpcA');
         if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
 
         ParamList.Pointer[0].Type = ACPI_TYPE_INTEGER;
@@ -55,7 +55,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
 
         ParamList.Count = 1;
 
-        ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'IPCA');
+        ParamList.Pointer = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_OBJECT), 'OpcA');
         if (!ParamList.Pointer) return STATUS_INSUFFICIENT_RESOURCES;
 
         ParamList.Pointer[0].String.Pointer = (CHAR*)SimpleStr->String;
@@ -73,7 +73,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
                               &RetBuff);
 
   if (ParamList.Count != 0)
-      ExFreePoolWithTag(ParamList.Pointer, 'IPCA');
+      ExFreePoolWithTag(ParamList.Pointer, 'OpcA');
 
   if (ACPI_SUCCESS(Status))
   {
@@ -114,7 +114,7 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
           ExtraParamLength = 0;
 
       OutputBuf = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
-                                               ExtraParamLength, 'IPCA');
+                                               ExtraParamLength, 'BpcA');
       if (!OutputBuf) return STATUS_INSUFFICIENT_RESOURCES;
 
       OutputBuf->Signature = ACPI_EVAL_OUTPUT_BUFFER_SIGNATURE;
@@ -150,12 +150,12 @@ Bus_PDO_EvalMethod(PPDO_DEVICE_DATA DeviceData,
           RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, OutputBuf, sizeof(ACPI_EVAL_OUTPUT_BUFFER) +
                                                                     ExtraParamLength);
           Irp->IoStatus.Information = sizeof(ACPI_EVAL_OUTPUT_BUFFER) + ExtraParamLength;
-          ExFreePoolWithTag(OutputBuf, 'IPCA');
+          ExFreePoolWithTag(OutputBuf, 'BpcA');
           return STATUS_SUCCESS;
       }
       else
       {
-          ExFreePoolWithTag(OutputBuf, 'IPCA');
+          ExFreePoolWithTag(OutputBuf, 'BpcA');
           return STATUS_BUFFER_TOO_SMALL;
       }
   }
index 746a0b1..bcea6de 100644 (file)
@@ -123,8 +123,7 @@ Bus_AddDevice(
         goto End;
     }
 
-    deviceName = ExAllocatePoolWithTag (NonPagedPool,
-                            nameLength, 'IPCA');
+    deviceName = ExAllocatePoolWithTag(NonPagedPool, nameLength, 'MpcA');
 
     if (NULL == deviceName) {
         DPRINT1("AddDevice: no memory to alloc for deviceName(0x%x)\n", nameLength);
@@ -160,7 +159,7 @@ Bus_AddDevice(
 
 End:
     if (deviceName){
-        ExFreePoolWithTag(deviceName, 'IPCA');
+        ExFreePoolWithTag(deviceName, 'MpcA');
     }
     if (!NT_SUCCESS(status) && deviceObject){
         if (deviceData && deviceData->NextLowerDriver){
@@ -376,7 +375,7 @@ AcpiRegQueryValue(IN HANDLE KeyHandle,
         BufferLength += FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data);
 
         /* Allocate memory for the value */
-        ValueInfo = ExAllocatePoolWithTag(PagedPool, BufferLength, 'IPCA');
+        ValueInfo = ExAllocatePoolWithTag(PagedPool, BufferLength, 'MpcA');
         if (ValueInfo == NULL)
             return STATUS_NO_MEMORY;
     }
@@ -436,7 +435,7 @@ AcpiRegQueryValue(IN HANDLE KeyHandle,
     /* Free the memory and return status */
     if (ValueInfo != NULL)
     {
-        ExFreePoolWithTag(ValueInfo, 'IPCA');
+        ExFreePoolWithTag(ValueInfo, 'MpcA');
     }
 
     return Status;
@@ -487,7 +486,7 @@ GetProcessorInformation(VOID)
 
     /* Allocate a buffer large enough to be zero terminated */
     Length += sizeof(UNICODE_NULL);
-    ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA');
+    ProcessorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
     if (ProcessorIdentifier == NULL)
     {
         DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
@@ -522,7 +521,7 @@ GetProcessorInformation(VOID)
 
     /* Allocate a buffer large enough to be zero terminated */
     Length += sizeof(UNICODE_NULL);
-    ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA');
+    ProcessorNameString = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
     if (ProcessorNameString == NULL)
     {
         DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
@@ -557,7 +556,7 @@ GetProcessorInformation(VOID)
 
     /* Allocate a buffer large enough to be zero terminated */
     Length += sizeof(UNICODE_NULL);
-    ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IPCA');
+    ProcessorVendorIdentifier = ExAllocatePoolWithTag(PagedPool, Length, 'IpcA');
     if (ProcessorVendorIdentifier == NULL)
     {
         DPRINT1("Failed to allocate 0x%lx bytes\n", Length);
@@ -617,7 +616,7 @@ GetProcessorInformation(VOID)
                          1) * sizeof(WCHAR);
 
     /* Allocate a buffer to the data */
-    HardwareIdsBuffer = ExAllocatePoolWithTag(PagedPool, HardwareIdsLength, 'IPCA');
+    HardwareIdsBuffer = ExAllocatePoolWithTag(PagedPool, HardwareIdsLength, 'IpcA');
     if (HardwareIdsBuffer == NULL)
     {
         Status = STATUS_INSUFFICIENT_RESOURCES;
@@ -656,15 +655,15 @@ done:
         ZwClose(ProcessorHandle);
 
     if (ProcessorIdentifier != NULL)
-        ExFreePoolWithTag(ProcessorIdentifier, 'IPCA');
+        ExFreePoolWithTag(ProcessorIdentifier, 'IpcA');
 
     if (ProcessorVendorIdentifier != NULL)
-        ExFreePoolWithTag(ProcessorVendorIdentifier, 'IPCA');
+        ExFreePoolWithTag(ProcessorVendorIdentifier, 'IpcA');
 
     if (!NT_SUCCESS(Status))
     {
         if (HardwareIdsBuffer != NULL)
-            ExFreePoolWithTag(HardwareIdsBuffer, 'IPCA');
+            ExFreePoolWithTag(HardwareIdsBuffer, 'IpcA');
     }
 
     return Status;
index 7b64a97..ec662d3 100644 (file)
@@ -162,7 +162,7 @@ void *
 AcpiOsAllocate (ACPI_SIZE size)
 {
     DPRINT("AcpiOsAllocate size %d\n",size);
-    return ExAllocatePoolWithTag(NonPagedPool, size, 'IPCA');
+    return ExAllocatePoolWithTag(NonPagedPool, size, 'ipcA');
 }
 
 void
@@ -170,7 +170,7 @@ AcpiOsFree(void *ptr)
 {
     if (!ptr)
         DPRINT1("Attempt to free null pointer!!!\n");
-    ExFreePoolWithTag(ptr, 'IPCA');
+    ExFreePoolWithTag(ptr, 'ipcA');
 }
 
 BOOLEAN
@@ -281,7 +281,7 @@ AcpiOsCreateMutex(
         return AE_BAD_PARAMETER;
     }
 
-    Mutex = ExAllocatePool(NonPagedPool, sizeof(FAST_MUTEX));
+    Mutex = ExAllocatePoolWithTag(NonPagedPool, sizeof(FAST_MUTEX), 'LpcA');
     if (!Mutex) return AE_NO_MEMORY;
 
     ExInitializeFastMutex(Mutex);
@@ -301,7 +301,7 @@ AcpiOsDeleteMutex(
         return;
     }
 
-    ExFreePool(Handle);
+    ExFreePoolWithTag(Handle, 'LpcA');
 }
 
 ACPI_STATUS
@@ -364,7 +364,7 @@ AcpiOsCreateSemaphore(
         return AE_BAD_PARAMETER;
     }
 
-    Sem = ExAllocatePool(NonPagedPool, sizeof(ACPI_SEM));
+    Sem = ExAllocatePoolWithTag(NonPagedPool, sizeof(ACPI_SEM), 'LpcA');
     if (!Sem) return AE_NO_MEMORY;
 
     Sem->CurrentUnits = InitialUnits;
@@ -386,7 +386,7 @@ AcpiOsDeleteSemaphore(
         return AE_BAD_PARAMETER;
     }
 
-    ExFreePool(Handle);
+    ExFreePoolWithTag(Handle, 'LpcA');
 
     return AE_OK;
 }
@@ -473,7 +473,7 @@ AcpiOsCreateLock(
         return AE_BAD_PARAMETER;
     }
 
-    SpinLock = ExAllocatePool(NonPagedPool, sizeof(KSPIN_LOCK));
+    SpinLock = ExAllocatePoolWithTag(NonPagedPool, sizeof(KSPIN_LOCK), 'LpcA');
     if (!SpinLock) return AE_NO_MEMORY;
 
     KeInitializeSpinLock(SpinLock);
@@ -493,7 +493,7 @@ AcpiOsDeleteLock(
         return;
     }
 
-    ExFreePool(Handle);
+    ExFreePoolWithTag(Handle, 'LpcA');
 }
 
 ACPI_CPU_FLAGS
index b0cb32d..1e94d53 100644 (file)
@@ -188,8 +188,7 @@ Bus_FDO_PnP (
         length = sizeof(DEVICE_RELATIONS) +
                 (((numPdosPresent + prevcount) - 1) * sizeof (PDEVICE_OBJECT));
 
-        relations = (PDEVICE_RELATIONS) ExAllocatePoolWithTag (PagedPool,
-                                        length, 'IPCA');
+        relations = ExAllocatePoolWithTag(PagedPool, length, 'IpcA');
 
         if (NULL == relations) {
             //
@@ -237,7 +236,7 @@ Bus_FDO_PnP (
         // one.
         //
         if (oldRelations) {
-            ExFreePool (oldRelations);
+            ExFreePoolWithTag(oldRelations, 0);
         }
         Irp->IoStatus.Information = (ULONG_PTR) relations;
 
@@ -399,7 +398,7 @@ Bus_DestroyPdo (
     //
 
     if (PdoData->HardwareIDs) {
-        ExFreePoolWithTag (PdoData->HardwareIDs, 'IPCA');
+        ExFreePoolWithTag(PdoData->HardwareIDs, 'DpcA');
         PdoData->HardwareIDs = NULL;
     }