public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/Dxe/Image: Restore mCurrentImage on all paths
@ 2017-04-11  2:14 Hao Wu
  2017-04-12  8:13 ` Gao, Liming
  0 siblings, 1 reply; 2+ messages in thread
From: Hao Wu @ 2017-04-11  2:14 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Liming Gao

This commit makes sure that in function CoreStartImage(), module
variable 'mCurrentImage' is restored to the current start image context
on all code paths.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
---
 MdeModulePkg/Core/Dxe/Image/Image.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 93720c85cb..03e979a604 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -1647,6 +1647,12 @@ CoreStartImage (
     //
     PERF_START (NULL, "StartImage:", NULL, Tick);
     PERF_END (NULL, "StartImage:", NULL, 0);
+
+    //
+    // Pop the current start image context
+    //
+    mCurrentImage = LastImage;
+
     return EFI_OUT_OF_RESOURCES;
   }
   Image->JumpContext = ALIGN_POINTER (Image->JumpBuffer, BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);
-- 
2.12.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MdeModulePkg/Dxe/Image: Restore mCurrentImage on all paths
  2017-04-11  2:14 [PATCH] MdeModulePkg/Dxe/Image: Restore mCurrentImage on all paths Hao Wu
@ 2017-04-12  8:13 ` Gao, Liming
  0 siblings, 0 replies; 2+ messages in thread
From: Gao, Liming @ 2017-04-12  8:13 UTC (permalink / raw)
  To: Wu, Hao A, edk2-devel@lists.01.org

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: Wu, Hao A
>Sent: Tuesday, April 11, 2017 10:14 AM
>To: edk2-devel@lists.01.org
>Cc: Wu, Hao A <hao.a.wu@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: [PATCH] MdeModulePkg/Dxe/Image: Restore mCurrentImage on all
>paths
>
>This commit makes sure that in function CoreStartImage(), module
>variable 'mCurrentImage' is restored to the current start image context
>on all code paths.
>
>Cc: Liming Gao <liming.gao@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.0
>Signed-off-by: Hao Wu <hao.a.wu@intel.com>
>---
> MdeModulePkg/Core/Dxe/Image/Image.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c
>b/MdeModulePkg/Core/Dxe/Image/Image.c
>index 93720c85cb..03e979a604 100644
>--- a/MdeModulePkg/Core/Dxe/Image/Image.c
>+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
>@@ -1647,6 +1647,12 @@ CoreStartImage (
>     //
>     PERF_START (NULL, "StartImage:", NULL, Tick);
>     PERF_END (NULL, "StartImage:", NULL, 0);
>+
>+    //
>+    // Pop the current start image context
>+    //
>+    mCurrentImage = LastImage;
>+
>     return EFI_OUT_OF_RESOURCES;
>   }
>   Image->JumpContext = ALIGN_POINTER (Image->JumpBuffer,
>BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT);
>--
>2.12.0.windows.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-12  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-11  2:14 [PATCH] MdeModulePkg/Dxe/Image: Restore mCurrentImage on all paths Hao Wu
2017-04-12  8:13 ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox