X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=ntoskrnl%2Fio%2Fiomgr%2Fiofunc.c;h=bde78e4f9639a5f74c150fa414526e5b4b8dd9f8;hp=46fcce201d8bd66e2d5e3ff0749e06f32885aef2;hb=d01184b16460b014fe9b19c5a142eb0ed88e6455;hpb=2cbc32e5e466bf89a9c8580d7c4377a37c5ac757 diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c index 46fcce201d8..bde78e4f963 100644 --- a/ntoskrnl/io/iomgr/iofunc.c +++ b/ntoskrnl/io/iomgr/iofunc.c @@ -213,6 +213,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle, ACCESS_MASK DesiredAccess; KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); ULONG BufferLength; + POOL_TYPE PoolType; PAGED_CODE(); @@ -495,6 +496,8 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle, StackPtr->Parameters.DeviceIoControl.OutputBufferLength = OutputBufferLength; + PoolType = IsDevIoCtl ? NonPagedPoolCacheAligned : NonPagedPool; + /* Handle the Methods */ switch (AccessType) { @@ -513,7 +516,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle, { /* Allocate the System Buffer */ Irp->AssociatedIrp.SystemBuffer = - ExAllocatePoolWithTag(NonPagedPool, + ExAllocatePoolWithTag(PoolType, BufferLength, TAG_SYS_BUF); @@ -560,7 +563,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle, { /* Allocate the System Buffer */ Irp->AssociatedIrp.SystemBuffer = - ExAllocatePoolWithTag(NonPagedPool, + ExAllocatePoolWithTag(PoolType, InputBufferLength, TAG_SYS_BUF);