diff options
author | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-25 03:04:31 +0000 |
---|---|---|
committer | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-05-25 03:04:31 +0000 |
commit | e439df50744c63c0e1a2a7971c4275f37457403e (patch) | |
tree | 438055bfa8c129032831e32386b11caa9c88878f /MdeModulePkg | |
parent | 62ba7e17047227e70de84f64517ecec46a8d47e9 (diff) | |
download | edk2-platforms-e439df50744c63c0e1a2a7971c4275f37457403e.tar.xz |
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Dxe/Mem/Page.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 5c82d3178a..e415a896cd 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1,7 +1,7 @@ /** @file
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
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
@@ -1516,11 +1516,6 @@ CoreGetMemoryMap ( Status = EFI_SUCCESS;
Done:
-
- CoreReleaseMemoryLock ();
-
- CoreReleaseGcdMemoryLock ();
-
//
// Update the map key finally
//
@@ -1528,6 +1523,10 @@ Done: *MapKey = mMemoryMapKey;
}
+ CoreReleaseMemoryLock ();
+
+ CoreReleaseGcdMemoryLock ();
+
*MemoryMapSize = BufferSize;
return Status;
|