From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.611.1572487138419856763 for ; Wed, 30 Oct 2019 18:58:58 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: hao.a.wu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Oct 2019 18:58:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,249,1569308400"; d="scan'208";a="199385688" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 30 Oct 2019 18:58:58 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 30 Oct 2019 18:58:57 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.225]) with mapi id 14.03.0439.000; Thu, 31 Oct 2019 09:58:56 +0800 From: "Wu, Hao A" To: "Zhang, Shenglei" , "devel@edk2.groups.io" CC: "Ni, Ray" Subject: Re: [PATCH v2 2/3] MdeModulePkg/UhciPei: Initialize the variable RequestMap Thread-Topic: [PATCH v2 2/3] MdeModulePkg/UhciPei: Initialize the variable RequestMap Thread-Index: AQHVjyuJrb9WmXFTR0uZusMZnRMJkadz/xXA Date: Thu, 31 Oct 2019 01:58:56 +0000 Message-ID: References: <20191030140830.31156-1-shenglei.zhang@intel.com> <20191030140830.31156-3-shenglei.zhang@intel.com> In-Reply-To: <20191030140830.31156-3-shenglei.zhang@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Zhang, Shenglei > Sent: Wednesday, October 30, 2019 10:08 PM > To: devel@edk2.groups.io > Cc: Wu, Hao A; Ni, Ray > Subject: [PATCH v2 2/3] MdeModulePkg/UhciPei: Initialize the variable > RequestMap >=20 > RequestMap is used but not Initialized. > RequestMap is called by UhciMapUserRequest, in which RequestMap(Map) > is called by IoMmuMap, and is finally called by IoMmu->Map. > We can not assume RequestMap is given an initial value at any step. Reviewed-by: Hao A Wu Best Regards, Hao Wu >=20 > Cc: Hao A Wu > Cc: Ray Ni > Signed-off-by: Shenglei Zhang > --- > MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c > b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c > index b897c3f82ce6..a05834da3c4a 100644 > --- a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c > +++ b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c > @@ -274,6 +274,8 @@ UhcControlTransfer ( >=20 > PktID =3D INPUT_PACKET_ID; >=20 > + RequestMap =3D NULL; > + > if (Request =3D=3D NULL || TransferResult =3D=3D NULL) { > return EFI_INVALID_PARAMETER; > } > -- > 2.18.0.windows.1