From nobody Wed Apr 24 04:04:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+92165+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92165+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1659699838; cv=none; d=zohomail.com; s=zohoarc; b=hyLmn1V14bzQ5qMRW5Aki0lcOqfruBAyVWJ4K6LaIClH+gb4FKL/AYhxgePuYi6lkGycXQ5vWLzkT36CJ1SwzbRJ8ftizOSBYNe5piLRQlHl2lnY40DUuwAzFcO1y+TWdYU9kniBfnzJJroeBscr7rkAxz8+2ampv3uSMFbb3VE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659699838; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=P+ehar7a7kiLyl+SG1XpR0lo7TWCfWvGM8+Lf9TC9tM=; b=c8sgKtVTRGT4J7DZErQ9cWpOhrgNcMdahfmGmOYzOiXCoHnGAt1l2bu8eSOBaA1uNZ7+c540NdQ/MQJH1Rbvmvks96Wy+nFq2kl/J3W1HD3J8SPCVax1+/4EcGTkldlzFrh+yVSgRXWnDeofmJ+55RekCPdUpeuipNWEGkLO10o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92165+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1659699838735276.63999208735186; Fri, 5 Aug 2022 04:43:58 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 732TYY1788612xAdBU52GAzE; Fri, 05 Aug 2022 04:43:58 -0700 X-Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web08.5837.1659699836724893471 for ; Fri, 05 Aug 2022 04:43:57 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10429"; a="316071385" X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="316071385" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Aug 2022 04:43:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="662956195" X-Received: from shwdeopenlab103.ccr.corp.intel.com ([10.239.182.136]) by fmsmga008.fm.intel.com with ESMTP; 05 Aug 2022 04:43:54 -0700 From: "Zeng, Star" To: devel@edk2.groups.io Cc: Star Zeng , Hao A Wu , Ray Ni , Zhikai Sun Subject: [edk2-devel] [PATCH] MdeModulePkg XhciPei: Fix dead loop issue in UsbHcFreeMemPool() Date: Fri, 5 Aug 2022 19:43:49 +0800 Message-Id: <20220805114349.1937-1-star.zeng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,star.zeng@intel.com X-Gm-Message-State: 32VoZqphWpgUSWyYCj8ajK2dx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1659699838; bh=VpMK2EnuiohBtjxbUEEjLjpQWajS8Dxs7xxjairOdRI=; h=Cc:Date:From:Reply-To:Subject:To; b=vGjpIjQ2IaZDJ5N6GeoZ610WRF/LtclhvrI4X1yXxGq2opcK2OmArKnNr4fbp1PHOsF OMGW1X2Hnba3pIPgpUHIy5lZA17GUkpLkzFRymLuW/oq9LZaoHrVkhtowLDJr105R5LrJ u987ZFbckLzOGe0c29D9DPRcOGy8OfZBK5M= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1659699839775100005 Content-Type: text/plain; charset="utf-8" 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 Cc: Ray Ni Cc: Zhikai Sun Signed-off-by: Star Zeng --- 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 =3D Pool->Head->Next; Block !=3D NULL; Block =3D Pool->Head->= Next) { + for (Block =3D Pool->Head->Next; Block !=3D NULL; Block =3D Block->Next)= { // UsbHcUnlinkMemBlock (Pool->Head, Block); UsbHcFreeMemBlock (Pool, Block); } --=20 2.33.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92165): https://edk2.groups.io/g/devel/message/92165 Mute This Topic: https://groups.io/mt/92833071/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-