mirror of https://github.com/acidanthera/audk.git
Make sure the return value of MapKey is correct by moving the assignment into memory lock protection region
Signed-off-by: erictian Reviewed-by: rsun3 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11700 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
62ba7e1704
commit
e439df5074
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
UEFI Memory page management functions.
|
UEFI Memory page management functions.
|
||||||
|
|
||||||
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -1516,11 +1516,6 @@ CoreGetMemoryMap (
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
|
|
||||||
Done:
|
Done:
|
||||||
|
|
||||||
CoreReleaseMemoryLock ();
|
|
||||||
|
|
||||||
CoreReleaseGcdMemoryLock ();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update the map key finally
|
// Update the map key finally
|
||||||
//
|
//
|
||||||
|
@ -1528,6 +1523,10 @@ Done:
|
||||||
*MapKey = mMemoryMapKey;
|
*MapKey = mMemoryMapKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CoreReleaseMemoryLock ();
|
||||||
|
|
||||||
|
CoreReleaseGcdMemoryLock ();
|
||||||
|
|
||||||
*MemoryMapSize = BufferSize;
|
*MemoryMapSize = BufferSize;
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
Loading…
Reference in New Issue