Author: tfaber
Date: Thu Feb 23 09:20:09 2017
New Revision: 73891
URL:
http://svn.reactos.org/svn/reactos?rev=73891&view=rev
Log:
[USBSTOR]
- Use pool tagging
Modified:
trunk/reactos/drivers/usb/usbstor/descriptor.c
trunk/reactos/drivers/usb/usbstor/disk.c
trunk/reactos/drivers/usb/usbstor/error.c
trunk/reactos/drivers/usb/usbstor/pdo.c
Modified: trunk/reactos/drivers/usb/usbstor/descriptor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/descri…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/descriptor.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/descriptor.c [iso-8859-1] Thu Feb 23 09:20:09 2017
@@ -414,7 +414,7 @@
//
DPRINT1("USBSTOR_SelectConfiguration failed to set interface %x\n",
Status);
FreeItem(InterfaceList);
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, 0);
return Status;
}
@@ -428,7 +428,7 @@
// failed to allocate interface information structure
//
FreeItem(InterfaceList);
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, 0);
return Status;
}
@@ -473,7 +473,7 @@
// free interface list & urb
//
FreeItem(InterfaceList);
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, 0);
//
// done
Modified: trunk/reactos/drivers/usb/usbstor/disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/disk.c…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/disk.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/disk.c [iso-8859-1] Thu Feb 23 09:20:09 2017
@@ -581,7 +581,9 @@
/* Legacy port capability query */
if (IoStack->Parameters.DeviceIoControl.OutputBufferLength == sizeof(PVOID))
{
- Capabilities = *((PVOID *)Irp->AssociatedIrp.SystemBuffer) =
ExAllocatePool(NonPagedPool, sizeof(IO_SCSI_CAPABILITIES));
+ Capabilities = *((PVOID *)Irp->AssociatedIrp.SystemBuffer) =
ExAllocatePoolWithTag(NonPagedPool,
+
sizeof(IO_SCSI_CAPABILITIES),
+
USB_STOR_TAG);
Irp->IoStatus.Information = sizeof(PVOID);
}
else
Modified: trunk/reactos/drivers/usb/usbstor/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/error.…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/error.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/error.c [iso-8859-1] Thu Feb 23 09:20:09 2017
@@ -268,7 +268,7 @@
//
// Free Work Item Data
//
- ExFreePool(WorkItemData);
+ ExFreePoolWithTag(WorkItemData, USB_STOR_TAG);
}
VOID
@@ -326,7 +326,7 @@
//
// Free Work Item Data
//
- ExFreePool(WorkItemData);
+ ExFreePoolWithTag(WorkItemData, USB_STOR_TAG);
}
@@ -389,7 +389,9 @@
if (ResetDevice && FDODeviceExtension->TimerWorkQueueEnabled &&
FDODeviceExtension->SrbErrorHandlingActive == FALSE)
{
- WorkItemData = (PERRORHANDLER_WORKITEM_DATA)ExAllocatePool(NonPagedPool,
sizeof(ERRORHANDLER_WORKITEM_DATA));
+ WorkItemData = ExAllocatePoolWithTag(NonPagedPool,
+ sizeof(ERRORHANDLER_WORKITEM_DATA),
+ USB_STOR_TAG);
if (WorkItemData)
{
//
Modified: trunk/reactos/drivers/usb/usbstor/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbstor/pdo.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbstor/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbstor/pdo.c [iso-8859-1] Thu Feb 23 09:20:09 2017
@@ -1018,7 +1018,9 @@
//
// create scsi block
//
- Request = (PSCSI_REQUEST_BLOCK)ExAllocatePool(NonPagedPool,
sizeof(SCSI_REQUEST_BLOCK));
+ Request = ExAllocatePoolWithTag(NonPagedPool,
+ sizeof(SCSI_REQUEST_BLOCK),
+ USB_STOR_TAG);
if (!Request)
{
//
@@ -1036,14 +1038,16 @@
//
// allocate data transfer block
//
- Request->DataBuffer = ExAllocatePool(NonPagedPool, DataTransferLength);
+ Request->DataBuffer = ExAllocatePoolWithTag(NonPagedPool,
+ DataTransferLength,
+ USB_STOR_TAG);
if (!Request)
{
//
// no memory
//
IoFreeIrp(Irp);
- ExFreePool(Request);
+ ExFreePoolWithTag(Request, USB_STOR_TAG);
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -1057,7 +1061,7 @@
// no memory
//
IoFreeIrp(Irp);
- ExFreePool(Request);
+ ExFreePoolWithTag(Request, USB_STOR_TAG);
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -1169,7 +1173,7 @@
//
// free resources
//
- ExFreePool(Request);
+ ExFreePoolWithTag(Request, USB_STOR_TAG);
IoFreeIrp(Irp);
return Status;
}
@@ -1255,7 +1259,7 @@
//
// free response
//
- ExFreePool(Response);
+ ExFreePoolWithTag(Response, USB_STOR_TAG);
return Status;
}