Fix Code Integrity error generated by the Drive Verifier

Add MdlMappingNoExecute to MmGetSystemAddressForMDLSafe call in
ExecutePresentDisplayOnly.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Sandy Stutsman 2015-10-21 11:54:37 -04:00 committed by Frediano Ziglio
parent aa48200e49
commit 8ec2bf9c68

View File

@ -2770,7 +2770,7 @@ VgaDevice::ExecutePresentDisplayOnly(
// Note: double mapping the buffer this way causes lot of system // Note: double mapping the buffer this way causes lot of system
// overhead for large size buffers. // overhead for large size buffers.
ctx->SrcAddr = reinterpret_cast<BYTE*> ctx->SrcAddr = reinterpret_cast<BYTE*>
(MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority )); (MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority | MdlMappingNoExecute));
if(!ctx->SrcAddr) { if(!ctx->SrcAddr) {
Status = STATUS_INSUFFICIENT_RESOURCES; Status = STATUS_INSUFFICIENT_RESOURCES;
@ -3669,7 +3669,7 @@ QxlDevice::ExecutePresentDisplayOnly(
// Note: double mapping the buffer this way causes lot of system // Note: double mapping the buffer this way causes lot of system
// overhead for large size buffers. // overhead for large size buffers.
ctx->SrcAddr = reinterpret_cast<BYTE*> ctx->SrcAddr = reinterpret_cast<BYTE*>
(MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority )); (MmGetSystemAddressForMdlSafe(mdl, NormalPagePriority | MdlMappingNoExecute));
if(!ctx->SrcAddr) { if(!ctx->SrcAddr) {
Status = STATUS_INSUFFICIENT_RESOURCES; Status = STATUS_INSUFFICIENT_RESOURCES;