File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
213
213
ACCESS_MASK DesiredAccess ;
214
214
KPROCESSOR_MODE PreviousMode = ExGetPreviousMode ();
215
215
ULONG BufferLength ;
216
+ POOL_TYPE PoolType ;
216
217
217
218
PAGED_CODE ();
218
219
@@ -495,6 +496,8 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
495
496
StackPtr -> Parameters .DeviceIoControl .OutputBufferLength =
496
497
OutputBufferLength ;
497
498
499
+ PoolType = IsDevIoCtl ? NonPagedPoolCacheAligned : NonPagedPool ;
500
+
498
501
/* Handle the Methods */
499
502
switch (AccessType )
500
503
{
@@ -513,7 +516,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
513
516
{
514
517
/* Allocate the System Buffer */
515
518
Irp -> AssociatedIrp .SystemBuffer =
516
- ExAllocatePoolWithTag (NonPagedPool ,
519
+ ExAllocatePoolWithTag (PoolType ,
517
520
BufferLength ,
518
521
TAG_SYS_BUF );
519
522
@@ -560,7 +563,7 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle,
560
563
{
561
564
/* Allocate the System Buffer */
562
565
Irp -> AssociatedIrp .SystemBuffer =
563
- ExAllocatePoolWithTag (NonPagedPool ,
566
+ ExAllocatePoolWithTag (PoolType ,
564
567
InputBufferLength ,
565
568
TAG_SYS_BUF );
566
569
You can’t perform that action at this time.
0 commit comments