diff options
| author | dwimmel-msft <[email protected]> | 2022-05-04 11:03:57 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-04 11:03:57 -0700 |
| commit | a423bafcdcf7a58de7d3abd284f6107e4cce329f (patch) | |
| tree | a5fd33f061d96ad3151270816f4dcb4f3d86476c /storage/class/disk/src/diskwmi.c | |
| parent | 30f39e4a535b0b4bc7215fdeee6b6d3a0659a797 (diff) | |
[storage/class/disk] Use ExAllocatePool2 (#712)
Diffstat (limited to 'storage/class/disk/src/diskwmi.c')
| -rw-r--r-- | storage/class/disk/src/diskwmi.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/storage/class/disk/src/diskwmi.c b/storage/class/disk/src/diskwmi.c index c1a0945e..7503e5a1 100644 --- a/storage/class/disk/src/diskwmi.c +++ b/storage/class/disk/src/diskwmi.c @@ -393,7 +393,7 @@ DiskReadSmartLog( logSize = SectorCount * SMART_LOG_SECTOR_SIZE; bufferSize = sizeof(SRB_IO_CONTROL) + max( sizeof(SENDCMDINPARAMS), sizeof(SENDCMDOUTPARAMS) - 1 + logSize ); - srbControl = ExAllocatePoolWithTag(NonPagedPoolNx, + srbControl = ExAllocatePool2(POOL_FLAG_NON_PAGED, bufferSize, DISK_TAG_SMART); @@ -444,7 +444,7 @@ DiskWriteSmartLog( bufferSize = sizeof(SRB_IO_CONTROL) + sizeof(SENDCMDINPARAMS) - 1 + logSize; - srbControl = ExAllocatePoolWithTag(NonPagedPoolNx, + srbControl = ExAllocatePool2(POOL_FLAG_NON_PAGED, bufferSize, DISK_TAG_SMART); @@ -992,7 +992,7 @@ DiskEnableInfoExceptions( modeDataSize = MODE_DATA_SIZE; - modeData = ExAllocatePoolWithTag(NonPagedPoolNxCacheAligned, + modeData = ExAllocatePool2(POOL_FLAG_NON_PAGED | POOL_FLAG_CACHE_ALIGNED, modeDataSize, DISK_TAG_INFO_EXCEPTION); @@ -1363,7 +1363,7 @@ Return Value: outBufferSize = sizeof(SRB_IO_CONTROL) + max( sizeof(SENDCMDINPARAMS), sizeof(SENDCMDOUTPARAMS) - 1 + READ_ATTRIBUTE_BUFFER_SIZE ); - outBuffer = ExAllocatePoolWithTag(NonPagedPoolNx, + outBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outBufferSize, DISK_TAG_SMART); @@ -1453,7 +1453,7 @@ Return Value: outBufferSize = sizeof(SRB_IO_CONTROL) + max( sizeof(SENDCMDINPARAMS), sizeof(SENDCMDOUTPARAMS) - 1 + READ_THRESHOLD_BUFFER_SIZE ); - outBuffer = ExAllocatePoolWithTag(NonPagedPoolNx, + outBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, outBufferSize, DISK_TAG_SMART); @@ -1588,7 +1588,7 @@ DiskPostReregisterRequest( return STATUS_INSUFFICIENT_RESOURCES; } - reregRequest = ExAllocatePoolWithTag(NonPagedPoolNx, + reregRequest = ExAllocatePool2(POOL_FLAG_NON_PAGED, sizeof(DISKREREGREQUEST), DISK_TAG_SMART); if (reregRequest != NULL) @@ -1934,7 +1934,7 @@ DiskInfoExceptionCheck( PSTOR_ADDR_BTL8 storAddrBtl8 = NULL; PSRBEX_DATA_SCSI_CDB16 srbExDataCdb16 = NULL; - modeData = ExAllocatePoolWithTag(NonPagedPoolNxCacheAligned, + modeData = ExAllocatePool2(POOL_FLAG_NON_PAGED | POOL_FLAG_CACHE_ALIGNED, MODE_DATA_SIZE, DISK_TAG_INFO_EXCEPTION); if (modeData == NULL) @@ -1949,7 +1949,7 @@ DiskInfoExceptionCheck( } else { srbSize = SCSI_REQUEST_BLOCK_SIZE; } - srb = ExAllocatePoolWithTag(NonPagedPoolNx, + srb = ExAllocatePool2(POOL_FLAG_NON_PAGED, srbSize, DISK_TAG_SRB); if (srb == NULL) @@ -1959,13 +1959,12 @@ DiskInfoExceptionCheck( "buffer\n")); return(STATUS_INSUFFICIENT_RESOURCES); } - RtlZeroMemory(srb, srbSize); // // Sense buffer is in aligned nonpaged pool. // - senseInfoBuffer = ExAllocatePoolWithTag(NonPagedPoolNxCacheAligned, + senseInfoBuffer = ExAllocatePool2(POOL_FLAG_NON_PAGED | POOL_FLAG_CACHE_ALIGNED, SENSE_BUFFER_SIZE_EX, '7CcS'); |
