winverbs/winmad: use ExFreePoolWithTag
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 28 Aug 2009 19:15:48 +0000 (19:15 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 28 Aug 2009 19:15:48 +0000 (19:15 +0000)
To help match memory allocations with free, replace ExFreePool with
ExFreePoolWithTag.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2387 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/winmad/kernel/wm_driver.c
core/winmad/kernel/wm_reg.c
core/winverbs/kernel/wv_cq.c
core/winverbs/kernel/wv_device.c
core/winverbs/kernel/wv_ep.c
core/winverbs/kernel/wv_pd.c
core/winverbs/kernel/wv_qp.c
core/winverbs/kernel/wv_srq.c
etc/kernel/work_queue.c

index b5b79e5..6d3cbdf 100644 (file)
@@ -247,7 +247,7 @@ static ib_ca_attr_t *WmQueryCaAttributes(WM_IB_DEVICE *pDevice)
        ib_status = pDevice->VerbsInterface.Verbs.\r
                                query_ca(pDevice->VerbsInterface.Verbs.p_hca_obj, attr, &size, NULL);\r
        if (ib_status != IB_SUCCESS) {\r
-               ExFreePool(attr);\r
+               ExFreePoolWithTag(attr, 'acmw');\r
                attr = NULL;\r
        }\r
 \r
@@ -282,7 +282,7 @@ static NTSTATUS WmAddCa(WM_IB_DEVICE *pDevice)
 \r
        status = STATUS_SUCCESS;\r
 out:\r
-       ExFreePool(attr);\r
+       ExFreePoolWithTag(attr, 'acmw');\r
        return status;\r
 }\r
 \r
@@ -361,7 +361,7 @@ static NTSTATUS WmPowerD0Exit(WDFDEVICE Device, WDF_POWER_DEVICE_STATE TargetSta
 \r
        pdev->IbInterface.wdm.InterfaceDereference(pdev->IbInterface.wdm.Context);\r
        if (pdev->pPortArray != NULL) {\r
-               ExFreePool(pdev->pPortArray);\r
+               ExFreePoolWithTag(pdev->pPortArray, 'pimw');\r
        }\r
 \r
        if (destroy) {\r
index 59f5055..8ee32e3 100644 (file)
@@ -265,7 +265,7 @@ void WmRegFree(WM_REGISTRATION *pRegistatration)
 {\r
        WmRegRemoveHandler(pRegistatration);\r
        WmProviderPut(pRegistatration->pProvider);\r
-       ExFreePool(pRegistatration);\r
+       ExFreePoolWithTag(pRegistatration, 'grmw');\r
 }\r
 \r
 void WmRegRemoveHandler(WM_REGISTRATION *pRegistration)\r
index 6adcd15..76e79db 100644 (file)
@@ -128,7 +128,7 @@ err3:
 err2:\r
        WdfObjectDelete(cq->Queue);\r
 err1:\r
-       ExFreePool(cq);\r
+       ExFreePoolWithTag(cq, 'qcvw');\r
        return status;\r
 }\r
 \r
@@ -235,7 +235,7 @@ void WvCqFree(WV_COMPLETION_QUEUE *pCq)
        WdfObjectDelete(pCq->Queue);\r
        WdfObjectDelete(pCq->ErrorQueue);\r
        WvDevicePut(pCq->pDevice);\r
-       ExFreePool(pCq);\r
+       ExFreePoolWithTag(pCq, 'qcvw');\r
 }\r
 \r
 void WvCqResize(WV_PROVIDER *pProvider, WDFREQUEST Request)\r
index 846f0b0..3175011 100644 (file)
@@ -187,7 +187,7 @@ static ib_ca_attr_t *WvQueryCaAttributes(WV_DEVICE *pDevice)
        ib_status = pDevice->pVerbs->query_ca(pDevice->pDevice->hDevice, attr,\r
                                                                                  &size, NULL);\r
        if (ib_status != IB_SUCCESS) {\r
-               ExFreePool(attr);\r
+               ExFreePoolWithTag(attr, 'acvw');\r
                attr = NULL;\r
        }\r
 \r
@@ -208,7 +208,7 @@ static NTSTATUS WvDeviceCreatePorts(WV_DEVICE *pDevice)
        }\r
 \r
        pDevice->PortCount = attr->num_ports;\r
-       ExFreePool(attr);\r
+       ExFreePoolWithTag(attr, 'acvw');\r
 \r
        pDevice->pPorts = ExAllocatePoolWithTag(NonPagedPool, sizeof(WV_PORT) *\r
                                                                                        pDevice->PortCount, 'cpvw');\r
@@ -388,7 +388,7 @@ void WvDeviceFree(WV_DEVICE *pDevice)
 \r
        WvDeviceFreePorts(pDevice);\r
        WvProviderPut(pDevice->pProvider);\r
-       ExFreePool(pDevice);\r
+       ExFreePoolWithTag(pDevice, 'cdvw');\r
 }\r
 \r
 void WvDeviceRemoveHandler(WV_DEVICE *pDevice)\r
@@ -576,7 +576,7 @@ void WvDeviceQuery(WV_PROVIDER *pProvider, WDFREQUEST Request)
 \r
        WvConvertDevAttr(attr, ca_attr);\r
        outlen = sizeof(WV_IO_DEVICE_ATTRIBUTES);\r
-       ExFreePool(ca_attr);\r
+       ExFreePoolWithTag(ca_attr, 'acvw');\r
 \r
 complete:\r
        WdfRequestCompleteWithInformation(Request, status, outlen);\r
@@ -625,7 +625,7 @@ void WvDevicePortQuery(WV_PROVIDER *pProvider, WDFREQUEST Request)
        outlen = sizeof(WV_IO_PORT_ATTRIBUTES);\r
 \r
 free:\r
-       ExFreePool(ca_attr);\r
+       ExFreePoolWithTag(ca_attr, 'acvw');\r
 complete:\r
        WdfRequestCompleteWithInformation(Request, status, outlen);\r
 }\r
@@ -681,7 +681,7 @@ void WvDeviceGidQuery(WV_PROVIDER *pProvider, WDFREQUEST Request)
        }\r
 \r
 free:\r
-       ExFreePool(ca_attr);\r
+       ExFreePoolWithTag(ca_attr, 'acvw');\r
 complete:\r
        WdfRequestCompleteWithInformation(Request, status, outlen);\r
 }\r
@@ -737,7 +737,7 @@ void WvDevicePkeyQuery(WV_PROVIDER *pProvider, WDFREQUEST Request)
        }\r
 \r
 free:\r
-       ExFreePool(ca_attr);\r
+       ExFreePoolWithTag(ca_attr, 'acvw');\r
 complete:\r
        WdfRequestCompleteWithInformation(Request, status, outlen);\r
 }\r
index e19e07a..16d5e87 100644 (file)
@@ -104,7 +104,7 @@ static NTSTATUS WvEpAllocate(WV_PROVIDER *pProvider, UINT16 EpType,
        return STATUS_SUCCESS;\r
 \r
 err:\r
-       ExFreePool(ep);\r
+       ExFreePoolWithTag(ep, 'pevw');\r
        return status;\r
 }\r
 \r
@@ -191,7 +191,7 @@ void WvEpFree(WV_ENDPOINT *pEndpoint)
 \r
        WdfIoQueuePurgeSynchronously(pEndpoint->Queue);\r
        WdfObjectDelete(pEndpoint->Queue);\r
-       ExFreePool(pEndpoint);\r
+       ExFreePoolWithTag(pEndpoint, 'pevw');\r
 }\r
 \r
 void WvEpQuery(WV_PROVIDER *pProvider, WDFREQUEST Request)\r
index 5ce0c20..af9a550 100644 (file)
@@ -101,7 +101,7 @@ static NTSTATUS WvPdAlloc(WV_DEVICE *pDevice, WV_PROTECTION_DOMAIN **ppPd,
        return STATUS_SUCCESS;\r
 \r
 err:\r
-       ExFreePool(pd);\r
+       ExFreePoolWithTag(pd, 'dpvw');\r
        return STATUS_UNSUCCESSFUL;\r
 }\r
 \r
@@ -233,7 +233,7 @@ void WvPdFree(WV_PROTECTION_DOMAIN *pPd)
                }\r
 \r
                cl_qmap_remove_item(&pPd->MrMap, &mr->Item);\r
-               ExFreePool(mr);\r
+               ExFreePoolWithTag(mr, 'rmvw');\r
        }\r
 \r
        if (pPd->hVerbsPd != NULL) {\r
@@ -241,7 +241,7 @@ void WvPdFree(WV_PROTECTION_DOMAIN *pPd)
        }\r
 \r
        WvDevicePut(pPd->pDevice);\r
-       ExFreePool(pPd);\r
+       ExFreePoolWithTag(pPd, 'dpvw');\r
 }\r
 \r
 void WvPdRemoveHandler(WV_PROTECTION_DOMAIN *pPd)\r
@@ -342,7 +342,7 @@ void WvMrRegister(WV_PROVIDER *pProvider, WDFREQUEST Request)
        return;\r
 \r
 err3:\r
-       ExFreePool(mr);\r
+       ExFreePoolWithTag(mr, 'rmvw');\r
 err2:\r
        WvPdRelease(pd);\r
 err1:\r
@@ -389,7 +389,7 @@ void WvMrDeregister(WV_PROVIDER *pProvider, WDFREQUEST Request)
                goto release;\r
        }\r
 \r
-       ExFreePool(mr);\r
+       ExFreePoolWithTag(mr, 'rmvw');\r
 release:\r
        WvPdRelease(pd);\r
 complete:\r
@@ -501,7 +501,7 @@ void WvMwFree(WV_MEMORY_WINDOW *pMw)
        }\r
 \r
        WvPdPut(pMw->pPd);\r
-       ExFreePool(pMw);\r
+       ExFreePoolWithTag(pMw, 'wmvw');\r
 }\r
 \r
 static void WvVerbsConvertAv(ib_av_attr_t *pVerbsAv, WV_IO_AV *pAv)\r
@@ -630,5 +630,5 @@ void WvAhFree(WV_ADDRESS_HANDLE *pAh)
        }\r
 \r
        WvPdPut(pAh->pPd);\r
-       ExFreePool(pAh);\r
+       ExFreePoolWithTag(pAh, 'havw');\r
 }\r
index c5da3e0..08c2a66 100644 (file)
@@ -480,7 +480,7 @@ err4:
 err3:\r
        WvQpCreateRelease(pProvider, qp);\r
 err2:\r
-       ExFreePool(qp);\r
+       ExFreePoolWithTag(qp, 'pqvw');\r
 err1:\r
        WdfRequestComplete(Request, status);\r
 }\r
@@ -528,7 +528,7 @@ void WvQpFree(WV_QUEUE_PAIR *pQp)
                if (mc->hVerbsMc != NULL) {\r
                        pQp->pVerbs->detach_mcast(mc->hVerbsMc);\r
                }\r
-               ExFreePool(mc);\r
+               ExFreePoolWithTag(mc, 'cmvw');\r
        }\r
 \r
        if (InterlockedDecrement(&pQp->Ref) > 0) {\r
@@ -545,7 +545,7 @@ void WvQpFree(WV_QUEUE_PAIR *pQp)
        WvCqPut(pQp->pReceiveCq);\r
        WvCqPut(pQp->pSendCq);\r
        WvPdPut(pQp->pPd);\r
-       ExFreePool(pQp);\r
+       ExFreePoolWithTag(pQp, 'pqvw');\r
 }\r
 \r
 void WvQpQuery(WV_PROVIDER *pProvider, WDFREQUEST Request)\r
@@ -669,7 +669,7 @@ void WvQpAttach(WV_PROVIDER *pProvider, WDFREQUEST Request)
 err3:\r
        WvQpRelease(qp);\r
 err2:\r
-       ExFreePool(pmc);\r
+       ExFreePoolWithTag(pmc, 'cmvw');\r
 err1:\r
        WdfRequestComplete(Request, status);\r
 }\r
@@ -707,7 +707,7 @@ void WvQpDetach(WV_PROVIDER *pProvider, WDFREQUEST Request)
                                qp->pVerbs->detach_mcast(pmc->hVerbsMc);\r
                        }\r
 \r
-                       ExFreePool(pmc);\r
+                       ExFreePoolWithTag(pmc, 'cmvw');\r
                        status = STATUS_SUCCESS;\r
                        goto release;\r
                }\r
index b0877ab..99f2b49 100644 (file)
@@ -133,7 +133,7 @@ static NTSTATUS WvSrqAlloc(WV_PROTECTION_DOMAIN *pPd, WV_IO_SRQ_ATTRIBUTES *pAtt
 err2:\r
        WdfObjectDelete(srq->Queue);\r
 err1:\r
-       ExFreePool(srq);\r
+       ExFreePoolWithTag(srq, 'rsvw');\r
        return STATUS_UNSUCCESSFUL;\r
 }\r
 \r
@@ -239,7 +239,7 @@ void WvSrqFree(WV_SHARED_RECEIVE_QUEUE *pSrq)
        WdfIoQueuePurgeSynchronously(pSrq->Queue);\r
        WdfObjectDelete(pSrq->Queue);\r
        WvPdPut(pSrq->pPd);\r
-       ExFreePool(pSrq);\r
+       ExFreePoolWithTag(pSrq, 'rsvw');\r
 }\r
 \r
 void WvSrqModify(WV_PROVIDER *pProvider, WDFREQUEST Request)\r
index 24af064..f83254a 100644 (file)
@@ -85,7 +85,7 @@ err:
        while (--i > 0) {\r
                IoFreeWorkItem(pWorkQueue->TaskArray[i].pWorkItem);\r
        }\r
-       ExFreePool(pWorkQueue->TaskArray);\r
+       ExFreePoolWithTag(pWorkQueue->TaskArray, 'ktqw');\r
        return STATUS_INSUFFICIENT_RESOURCES;\r
 }\r
 \r