Author: tfaber
Date: Sun May 12 17:59:14 2013
New Revision: 59009
URL:
http://svn.reactos.org/svn/reactos?rev=59009&view=rev
Log:
[HIDUSB]
- Use pool tagging
Modified:
trunk/reactos/drivers/hid/hidusb/hidusb.c
trunk/reactos/drivers/hid/hidusb/hidusb.h
Modified: trunk/reactos/drivers/hid/hidusb/hidusb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidusb/hidusb.…
==============================================================================
--- trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/hid/hidusb/hidusb.c [iso-8859-1] Sun May 12 17:59:14 2013
@@ -142,7 +142,7 @@
//
// allocate urb
//
- Urb = ExAllocatePool(NonPagedPool, sizeof(struct _URB_PIPE_REQUEST));
+ Urb = ExAllocatePoolWithTag(NonPagedPool, sizeof(struct _URB_PIPE_REQUEST),
HIDUSB_URB_TAG);
if (!Urb)
{
//
@@ -167,7 +167,7 @@
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
//
// done
@@ -194,7 +194,7 @@
//
// allocate urb
//
- Urb = ExAllocatePool(NonPagedPool, sizeof(struct _URB_PIPE_REQUEST));
+ Urb = ExAllocatePoolWithTag(NonPagedPool, sizeof(struct _URB_PIPE_REQUEST),
HIDUSB_URB_TAG);
if (!Urb)
{
//
@@ -226,7 +226,7 @@
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
//
// done
@@ -410,7 +410,7 @@
ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);
IoFreeWorkItem(ResetContext->WorkItem);
IoCompleteRequest(ResetContext->Irp, IO_NO_INCREMENT);
- ExFreePool(ResetContext);
+ ExFreePoolWithTag(ResetContext, HIDUSB_TAG);
}
@@ -460,7 +460,7 @@
//
// free the urb
//
- ExFreePool(Context);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
//
// finish completion
@@ -477,7 +477,7 @@
//
// allocate reset context
//
- ResetContext = (PHID_USB_RESET_CONTEXT)ExAllocatePool(NonPagedPool,
sizeof(HID_USB_RESET_CONTEXT));
+ ResetContext = ExAllocatePoolWithTag(NonPagedPool, sizeof(HID_USB_RESET_CONTEXT),
HIDUSB_TAG);
if (ResetContext)
{
//
@@ -500,7 +500,7 @@
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
//
// defer completion
@@ -510,13 +510,13 @@
//
// free context
//
- ExFreePool(ResetContext);
+ ExFreePoolWithTag(ResetContext, HIDUSB_TAG);
}
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
//
// complete request
@@ -564,7 +564,7 @@
//
// lets allocate urb
//
- Urb = (PURB)ExAllocatePool(NonPagedPool, sizeof(struct
_URB_BULK_OR_INTERRUPT_TRANSFER));
+ Urb = ExAllocatePoolWithTag(NonPagedPool, sizeof(struct
_URB_BULK_OR_INTERRUPT_TRANSFER), HIDUSB_URB_TAG);
if (!Urb)
{
//
@@ -1068,7 +1068,7 @@
//
// allocate urb
//
- Urb = (PURB)ExAllocatePool(NonPagedPool, UrbLength);
+ Urb = ExAllocatePoolWithTag(NonPagedPool, UrbLength, HIDUSB_URB_TAG);
if (!Urb)
{
//
@@ -1085,13 +1085,13 @@
//
// allocate buffer
//
- *UrbBuffer = ExAllocatePool(NonPagedPool, *UrbBufferLength);
+ *UrbBuffer = ExAllocatePoolWithTag(NonPagedPool, *UrbBufferLength, HIDUSB_TAG);
if (!*UrbBuffer)
{
//
// no memory
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -1132,14 +1132,14 @@
//
// free allocated buffer
//
- ExFreePool(*UrbBuffer);
+ ExFreePoolWithTag(*UrbBuffer, HIDUSB_TAG);
*UrbBuffer = NULL;
}
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
*UrbBufferLength = 0;
return Status;
}
@@ -1154,14 +1154,14 @@
//
// free allocated buffer
//
- ExFreePool(*UrbBuffer);
+ ExFreePoolWithTag(*UrbBuffer, HIDUSB_TAG);
*UrbBuffer = NULL;
}
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
*UrbBufferLength = 0;
return STATUS_UNSUCCESSFUL;
}
@@ -1174,7 +1174,7 @@
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
//
// completed successfully
@@ -1257,7 +1257,7 @@
//
// copy interface info
//
- HidDeviceExtension->InterfaceInfo =
(PUSBD_INTERFACE_INFORMATION)ExAllocatePool(NonPagedPool,
Urb->UrbSelectConfiguration.Interface.Length);
+ HidDeviceExtension->InterfaceInfo = ExAllocatePoolWithTag(NonPagedPool,
Urb->UrbSelectConfiguration.Interface.Length, HIDUSB_TAG);
if (HidDeviceExtension->InterfaceInfo)
{
//
@@ -1270,7 +1270,7 @@
//
// free urb request
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, 0);
//
// done
@@ -1296,7 +1296,7 @@
//
// allocate urb
//
- Urb = ExAllocatePool(NonPagedPool, sizeof(struct
_URB_CONTROL_VENDOR_OR_CLASS_REQUEST));
+ Urb = ExAllocatePoolWithTag(NonPagedPool, sizeof(struct
_URB_CONTROL_VENDOR_OR_CLASS_REQUEST), HIDUSB_URB_TAG);
if (!Urb)
{
//
@@ -1334,7 +1334,7 @@
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
//
// print status
@@ -1372,7 +1372,7 @@
//
// allocate urb
//
- Urb = ExAllocatePool(NonPagedPool, sizeof(struct
_URB_CONTROL_VENDOR_OR_CLASS_REQUEST));
+ Urb = ExAllocatePoolWithTag(NonPagedPool, sizeof(struct
_URB_CONTROL_VENDOR_OR_CLASS_REQUEST), HIDUSB_URB_TAG);
if (!Urb)
{
//
@@ -1410,7 +1410,7 @@
//
// free urb
//
- ExFreePool(Urb);
+ ExFreePoolWithTag(Urb, HIDUSB_URB_TAG);
//
// boot protocol active 0x00 disabled 0x1
@@ -1502,7 +1502,7 @@
//
// delete partial configuration descriptor
//
- ExFreePool(HidDeviceExtension->ConfigurationDescriptor);
+ ExFreePoolWithTag(HidDeviceExtension->ConfigurationDescriptor, HIDUSB_TAG);
HidDeviceExtension->ConfigurationDescriptor = NULL;
//
@@ -1648,7 +1648,7 @@
//
if (HidDeviceExtension->ConfigurationDescriptor)
{
- ExFreePool(HidDeviceExtension->ConfigurationDescriptor);
+ ExFreePoolWithTag(HidDeviceExtension->ConfigurationDescriptor,
HIDUSB_TAG);
HidDeviceExtension->ConfigurationDescriptor = NULL;
}
@@ -1725,7 +1725,7 @@
//
if (HidDeviceExtension->HidDescriptor)
{
- ExFreePool(HidDeviceExtension->HidDescriptor);
+ ExFreePoolWithTag(HidDeviceExtension->HidDescriptor, HIDUSB_TAG);
HidDeviceExtension->HidDescriptor = NULL;
}
Modified: trunk/reactos/drivers/hid/hidusb/hidusb.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/hid/hidusb/hidusb.…
==============================================================================
--- trunk/reactos/drivers/hid/hidusb/hidusb.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/hid/hidusb/hidusb.h [iso-8859-1] Sun May 12 17:59:14 2013
@@ -86,3 +86,6 @@
#define USB_SET_IDLE_REQUEST 0xA
#define USB_GET_PROTOCOL_REQUEST 0x3
+
+#define HIDUSB_TAG 'UdiH'
+#define HIDUSB_URB_TAG 'rUiH'