ACCESS_MASK DesiredAccess;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
ULONG BufferLength;
+ POOL_TYPE PoolType;
PAGED_CODE();
StackPtr->Parameters.DeviceIoControl.OutputBufferLength =
OutputBufferLength;
+ PoolType = IsDevIoCtl ? NonPagedPoolCacheAligned : NonPagedPool;
+
/* Handle the Methods */
switch (AccessType)
{
{
/* Allocate the System Buffer */
Irp->AssociatedIrp.SystemBuffer =
- ExAllocatePoolWithTag(NonPagedPool,
+ ExAllocatePoolWithTag(PoolType,
BufferLength,
TAG_SYS_BUF);
{
/* Allocate the System Buffer */
Irp->AssociatedIrp.SystemBuffer =
- ExAllocatePoolWithTag(NonPagedPool,
+ ExAllocatePoolWithTag(PoolType,
InputBufferLength,
TAG_SYS_BUF);