From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.31760.1585202726658234741 for ; Wed, 25 Mar 2020 23:05:26 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: hao.a.wu@intel.com) IronPort-SDR: 8dQnSB8739AU+mWUQUp+Eh4Rb7pUox0zy5TUOLntYiVMduf3OUpAC9IXqa4zZnR/EREDpebK+0 VJ7q7NSWc/cg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2020 23:05:26 -0700 IronPort-SDR: x4jpSsjnNgujkr9r6N/49+bE6p0gDCokH67w1kohPkvmFYuyhB3W2GqQB1wvR4eji/EJK+Avhh Esp/aQxd3sxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,307,1580803200"; d="scan'208";a="393867645" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 25 Mar 2020 23:05:25 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Mar 2020 23:05:25 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 25 Mar 2020 23:05:25 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.86]) with mapi id 14.03.0439.000; Thu, 26 Mar 2020 14:05:23 +0800 From: "Wu, Hao A" To: "Jiang, Guomin" , "devel@edk2.groups.io" , "newexplorerj@gmail.com" CC: "Ni, Ray" Subject: Re: [edk2-devel] [PATCH v2] MdeModulePkg/SdDxe: Potential NULL pointer on Token Thread-Topic: [edk2-devel] [PATCH v2] MdeModulePkg/SdDxe: Potential NULL pointer on Token Thread-Index: AQHV8gl8E+zDkMa61EKxNN1rO+RtH6hZ/IIAgACHtRA= Date: Thu, 26 Mar 2020 06:05:22 +0000 Message-ID: References: In-Reply-To: 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: Jiang, Guomin > Sent: Thursday, March 26, 2020 1:57 PM > To: devel@edk2.groups.io; newexplorerj@gmail.com > Cc: Wu, Hao A; Ni, Ray > Subject: RE: [edk2-devel] [PATCH v2] MdeModulePkg/SdDxe: Potential NULL > pointer on Token >=20 > Hi Ray, Hao >=20 > Could you please help review this changes. Really sorry for missing this patch. Could you help to follow the codes in function EmmcEraseBlocks() under fil= e: MdeModulePkg/Bus/Sd/EmmcDxe/EmmcBlockIo.c for the fix in SdDxe? Thanks. Best Regards, Hao Wu >=20 > Thanks. > > -----Original Message----- > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > > GuoMinJ > > Sent: Wednesday, March 4, 2020 5:41 PM > > To: devel@edk2.groups.io > > Cc: GuoMinJ ; Wu, Hao A > > ; Ni, Ray > > Subject: [edk2-devel] [PATCH v2] MdeModulePkg/SdDxe: Potential NULL > > pointer on Token > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2286 > > > > Token pointer may be NULL, it is should be check before use it. > > > > Cc: Hao A Wu > > Cc: Ray Ni > > Signed-off-by: GuoMinJ > > --- > > MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c > > b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c > > index 9f42abe7e2..0cc2e70b58 100644 > > --- a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c > > +++ b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c > > @@ -1367,7 +1367,12 @@ SdEraseBlocks ( > > return Status; > > } > > > > - DEBUG ((EFI_D_ERROR, "SdEraseBlocks(): Lba 0x%x BlkNo 0x%x Event %p > > with %r\n", Lba, BlockNum, Token->Event, Status)); > > + DEBUG ((DEBUG_ERROR, "SdEraseBlocks(): Lba 0x%x BlkNo 0x%x with %r, > > + ", Lba, BlockNum, Status)); if ((Token !=3D NULL) && (Token->Event = !=3D > > NULL)) { > > + DEBUG ((DEBUG_ERROR, "Event pointer is %p\n", Token->Event)); } > > + else { > > + DEBUG ((DEBUG_ERROR, "Event is meaningless\n")); } > > > > return Status; > > } > > -- > > 2.17.1 > > > > > >=20