projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2cbc32e
)
[NTOSKRNL] Use cache aligned buffer for devioctrl
author
Pierre Schweitzer
<pierre@reactos.org>
Sun, 26 Nov 2017 12:56:48 +0000
(13:56 +0100)
committer
Pierre Schweitzer
<pierre@reactos.org>
Sun, 26 Nov 2017 13:03:30 +0000
(14:03 +0100)
ntoskrnl/io/iomgr/iofunc.c
patch
|
blob
|
history
diff --git
a/ntoskrnl/io/iomgr/iofunc.c
b/ntoskrnl/io/iomgr/iofunc.c
index
46fcce2
..
bde78e4
100644
(file)
--- 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;
ACCESS_MASK DesiredAccess;
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode();
ULONG BufferLength;
+ POOL_TYPE PoolType;
PAGED_CODE();
PAGED_CODE();
@@
-495,6
+496,8
@@
IopDeviceFsIoControl(IN HANDLE DeviceHandle,
StackPtr->Parameters.DeviceIoControl.OutputBufferLength =
OutputBufferLength;
StackPtr->Parameters.DeviceIoControl.OutputBufferLength =
OutputBufferLength;
+ PoolType = IsDevIoCtl ? NonPagedPoolCacheAligned : NonPagedPool;
+
/* Handle the Methods */
switch (AccessType)
{
/* Handle the Methods */
switch (AccessType)
{
@@
-513,7
+516,7
@@
IopDeviceFsIoControl(IN HANDLE DeviceHandle,
{
/* Allocate the System Buffer */
Irp->AssociatedIrp.SystemBuffer =
{
/* Allocate the System Buffer */
Irp->AssociatedIrp.SystemBuffer =
- ExAllocatePoolWithTag(
NonPagedPool
,
+ ExAllocatePoolWithTag(
PoolType
,
BufferLength,
TAG_SYS_BUF);
BufferLength,
TAG_SYS_BUF);
@@
-560,7
+563,7
@@
IopDeviceFsIoControl(IN HANDLE DeviceHandle,
{
/* Allocate the System Buffer */
Irp->AssociatedIrp.SystemBuffer =
{
/* Allocate the System Buffer */
Irp->AssociatedIrp.SystemBuffer =
- ExAllocatePoolWithTag(
NonPagedPool
,
+ ExAllocatePoolWithTag(
PoolType
,
InputBufferLength,
TAG_SYS_BUF);
InputBufferLength,
TAG_SYS_BUF);