From e439df50744c63c0e1a2a7971c4275f37457403e Mon Sep 17 00:00:00 2001 From: erictian Date: Wed, 25 May 2011 03:04:31 +0000 Subject: [PATCH] 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 --- MdeModulePkg/Core/Dxe/Mem/Page.c | 11 +++++------ 1 file 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.
+Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
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; -- 2.39.2