mirror of https://github.com/acidanthera/audk.git
Remove the unnecessary spin_lock protection around CoreUnloadImage. There is almost zero possibility for this reentrancy issue here. With this change, we also keep EDK 2 and EDK core's CoreUnloadImage consistent with each other.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5906 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a04ad3f01f
commit
46fee0d7b6
|
@ -17,8 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
// Module Globals
|
||||
//
|
||||
|
||||
SPIN_LOCK mUnloadImageLock;
|
||||
|
||||
LOADED_IMAGE_PRIVATE_DATA *mCurrentImage = NULL;
|
||||
|
||||
LOAD_PE32_IMAGE_PRIVATE_DATA mLoadPe32PrivateData = {
|
||||
|
@ -139,11 +137,6 @@ CoreInitializeImageServices (
|
|||
|
||||
mCurrentImage = Image;
|
||||
|
||||
//
|
||||
// Initialize spin lock
|
||||
//
|
||||
InitializeSpinLock (&mUnloadImageLock);
|
||||
|
||||
//
|
||||
// Fill in DXE globals
|
||||
//
|
||||
|
@ -1366,14 +1359,6 @@ CoreUnloadImage (
|
|||
EFI_STATUS Status;
|
||||
LOADED_IMAGE_PRIVATE_DATA *Image;
|
||||
|
||||
//
|
||||
// Prevent possible reentrance to this function
|
||||
// for the same ImageHandle
|
||||
//
|
||||
if (!AcquireSpinLockOrFail (&mUnloadImageLock)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Image = CoreLoadedImageInfo (ImageHandle);
|
||||
if (Image == NULL ) {
|
||||
//
|
||||
|
@ -1408,7 +1393,6 @@ CoreUnloadImage (
|
|||
}
|
||||
|
||||
Done:
|
||||
ReleaseSpinLock (&mUnloadImageLock);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue