https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d01184b16460b014fe9b19...
commit d01184b16460b014fe9b19c5a142eb0ed88e6455 Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Sun Nov 26 13:56:48 2017 +0100
[NTOSKRNL] Use cache aligned buffer for devioctrl --- ntoskrnl/io/iomgr/iofunc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c index 46fcce201d..bde78e4f96 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);