mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdeModulePkg/RuntimeDxe: clear mVirtualMapMaxIndex
When setting mVirtualMap to NULL also set mVirtualMapMaxIndex to 0. Without that RuntimeDriverConvertPointer() will go search the ZeroPage for EFI_MEMORY_DESCRIPTOR entries. In case mVirtualMapMaxIndex happens to be small small enough that'll go unnoticed, the search will not find anything and EFI_NOT_FOUND will be returned. In case mVirtualMapMaxIndex is big enough the search will reach the end of the ZeroPage and trigger a page fault. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
parent
d4ac53aa91
commit
f78b937c95
@ -365,7 +365,8 @@ RuntimeDriverSetVirtualAddressMap (
|
||||
//
|
||||
// mVirtualMap is only valid during SetVirtualAddressMap() call
|
||||
//
|
||||
mVirtualMap = NULL;
|
||||
mVirtualMap = NULL;
|
||||
mVirtualMapMaxIndex = 0;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user