]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/AmdSevDxe: Close mAcceptAllMemoryEvent
authorDionna Glaze <dionnaglaze@google.com>
Tue, 14 Feb 2023 23:07:19 +0000 (23:07 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 15 Feb 2023 00:08:00 +0000 (00:08 +0000)
This event should only trigger once. It should be idempotent, but the
allocation of the memory map itself is observable and can cause
ExitBootServices to fail with a modified map key.

Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Michael Roth <michael.roth@amd.com>
Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
OvmfPkg/AmdSevDxe/AmdSevDxe.c

index 9c4e3bb40638139a8783112a9eba03e43bc74065..a726498e27923424fdc496685a267f09c8cc4daa 100644 (file)
@@ -130,6 +130,7 @@ AcceptAllMemory (
   }\r
 \r
   gBS->FreePool (AllDescMap);\r
+  gBS->CloseEvent (mAcceptAllMemoryEvent);\r
   return Status;\r
 }\r
 \r