From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Li, Aaron" <aaron.li@intel.com>
Cc: "Chaganty, Rangasai V" <rangasai.v.chaganty@intel.com>,
"Fu, Siyuan" <siyuan.fu@intel.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Fix return value in ShadowMicrocode.
Date: Wed, 9 Dec 2020 06:19:06 +0000 [thread overview]
Message-ID: <CO1PR11MB4930519FD4909696B318FFB48CCC0@CO1PR11MB4930.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201208061924.6082-1-aaron.li@intel.com>
It seems PatchInfoBuffer is not freed when Not Found is returned.
Thanks,
Ray
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Aaron Li
> Sent: Tuesday, December 8, 2020 2:19 PM
> To: devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V
> <rangasai.v.chaganty@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>
> Subject: [edk2-devel] [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Fix
> return value in ShadowMicrocode.
>
> ShadowMicrocode should return EFI_NOT_FOUND when no valid Microcode
> found
> in FIT table.
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3110
>
> Signed-off-by: Aaron Li <aaron.li@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> ---
>
> Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei.c
> | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git
> a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei
> .c
> b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei
> .c
> index 5c7ee6910c8e..5539a121cbb6 100644
> ---
> a/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei
> .c
> +++
> b/Silicon/Intel/IntelSiliconPkg/Feature/ShadowMicrocode/ShadowMicrocodePei
> .c
> @@ -377,6 +377,9 @@ IsValidFitTable (
> with microcode patches data in it.
>
>
>
> @retval EFI_SUCCESS The microcode has been shadowed to memory.
>
> + @retval EFI_INVALID_PARAMETER BufferSize or Buffer is NULL.
>
> + @retval EFI_INVALID_PARAMETER CpuIdCount not equal to 0 and
> MicrocodeCpuId is NULL.
>
> + @retval EFI_NOT_FOUND No valid microcode found.
>
> @retval EFI_OUT_OF_RESOURCES The operation fails due to lack of
> resources.
>
>
>
> **/
>
> @@ -460,6 +463,9 @@ ShadowMicrocode (
> ));
>
>
>
> ShadowMicrocodePatchWorker (PatchInfoBuffer, PatchCount, TotalLoadSize,
> BufferSize, Buffer);
>
> + } else {
>
> + FreePool (PatchInfoBuffer);
>
> + return EFI_NOT_FOUND;
>
> }
>
>
>
> FreePool (PatchInfoBuffer);
>
> --
> 2.29.2.windows.2
>
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#68443): https://edk2.groups.io/g/devel/message/68443
> Mute This Topic: https://groups.io/mt/78798288/1712937
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [ray.ni@intel.com]
> -=-=-=-=-=-=
>
next prev parent reply other threads:[~2020-12-09 6:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-08 6:19 [PATCH v1 1/1] IntelSiliconPkg/ShadowMicrocodePei: Fix return value in ShadowMicrocode Aaron Li
2020-12-09 6:19 ` Ni, Ray [this message]
[not found] ` <164EF7F6368FEA75.12383@groups.io>
2020-12-09 6:25 ` [edk2-devel] " Ni, Ray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CO1PR11MB4930519FD4909696B318FFB48CCC0@CO1PR11MB4930.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox