From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Ni, Ray" <ray.ni@intel.com>, "Sun, Zhikai" <zhikai.sun@intel.com>
Subject: Re: [PATCH] MdeModulePkg XhciPei: Fix dead loop issue in UsbHcFreeMemPool()
Date: Mon, 8 Aug 2022 01:08:43 +0000 [thread overview]
Message-ID: <DM6PR11MB4025515E76E195A755508680CA639@DM6PR11MB4025.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220805114349.1937-1-star.zeng@intel.com>
Thanks Star,
How about removing the comments that mention 'UsbHcUnlinkMemBlock' (3 occurrences, in UsbHcFreeMemPool() and UsbHcFreeMem()) to avoid possible confusion?
Best Regards,
Hao Wu
> -----Original Message-----
> From: Zeng, Star <star.zeng@intel.com>
> Sent: Friday, August 5, 2022 7:44 PM
> To: devel@edk2.groups.io
> Cc: Zeng, Star <star.zeng@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Ni,
> Ray <ray.ni@intel.com>; Sun, Zhikai <zhikai.sun@intel.com>
> Subject: [PATCH] MdeModulePkg XhciPei: Fix dead loop issue in
> UsbHcFreeMemPool()
>
> Use Block->Next instead of Pool->Head->Next, otherwise the for loop will be
> not able to come out.
> It will also match with the UsbHcFreeMemPool() in EhciPei.
>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Zhikai Sun <zhikai.sun@intel.com>
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
> MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> b/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> index c64b38fcfc89..148425ae844e 100644
> --- a/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> +++ b/MdeModulePkg/Bus/Pci/XhciPei/UsbHcMem.c
> @@ -385,7 +385,7 @@ UsbHcFreeMemPool (
> // UsbHcUnlinkMemBlock can't be used to unlink and free the // first block.
> //- for (Block = Pool->Head->Next; Block != NULL; Block = Pool->Head->Next)
> {+ for (Block = Pool->Head->Next; Block != NULL; Block = Block->Next) { //
> UsbHcUnlinkMemBlock (Pool->Head, Block); UsbHcFreeMemBlock (Pool,
> Block); }--
> 2.33.1.windows.1
prev parent reply other threads:[~2022-08-08 1:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 11:43 [PATCH] MdeModulePkg XhciPei: Fix dead loop issue in UsbHcFreeMemPool() Zeng, Star
2022-08-08 1:08 ` Wu, Hao A [this message]
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=DM6PR11MB4025515E76E195A755508680CA639@DM6PR11MB4025.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