From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 90A12207E57FA for ; Wed, 12 Apr 2017 01:13:11 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2017 01:13:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,189,1488873600"; d="scan'208";a="955102424" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga003.jf.intel.com with ESMTP; 12 Apr 2017 01:13:10 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Apr 2017 01:13:10 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Apr 2017 01:13:10 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Wed, 12 Apr 2017 16:13:07 +0800 From: "Gao, Liming" To: "Wu, Hao A" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdeModulePkg/Dxe/Image: Restore mCurrentImage on all paths Thread-Index: AQHSsmlV7HYQGN77EESCvFPRKxIvv6HBZFxQ Date: Wed, 12 Apr 2017 08:13:07 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D71D4FF@shsmsx102.ccr.corp.intel.com> References: <20170411021407.14312-1-hao.a.wu@intel.com> In-Reply-To: <20170411021407.14312-1-hao.a.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/Dxe/Image: Restore mCurrentImage on all paths X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 08:13:11 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Wu, Hao A >Sent: Tuesday, April 11, 2017 10:14 AM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Gao, Liming >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 >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Hao Wu >--- > 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 =3D LastImage; >+ > return EFI_OUT_OF_RESOURCES; > } > Image->JumpContext =3D ALIGN_POINTER (Image->JumpBuffer, >BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT); >-- >2.12.0.windows.1