From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.3168.1585271182460776479 for ; Thu, 26 Mar 2020 18:06:22 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: hao.a.wu@intel.com) IronPort-SDR: eTu6kghFDPpLVoop9e8A9bIihO1vgYxnwzCWs4Xt1KALsb5EUSrS5AFuGgM2JUwaSoCdBSfaEO Ci1xH+iCbPZg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2020 18:06:14 -0700 IronPort-SDR: DdM0BJNH+GNzmn0eNz3D5s9Yp8xK744dVN8m7rp7rK+CfgnCydBMlu4s2cT8SXyUAWs+nuYuze JDcCLuUAAkEg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,310,1580803200"; d="scan'208";a="358339805" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 26 Mar 2020 18:06:14 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Mar 2020 18:06:13 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Mar 2020 18:06:13 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.235]) with mapi id 14.03.0439.000; Fri, 27 Mar 2020 09:06:12 +0800 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Wu, Hao A" , "Jiang, Guomin" CC: "Wang, Jian J" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH v3] MdeModulePkg/SdDxe: Check the Token to avoid null pointer Thread-Topic: [edk2-devel] [PATCH v3] MdeModulePkg/SdDxe: Check the Token to avoid null pointer Thread-Index: AQHWAznLAT/lkYsTskqXySUzrMnc1ahab0pwgAEx50A= Date: Fri, 27 Mar 2020 01:06:11 +0000 Message-ID: References: <20200326064250.1519-1-guomin.jiang@intel.com> 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: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Wu= , > Hao A > Sent: Thursday, March 26, 2020 2:51 PM > To: devel@edk2.groups.io; Jiang, Guomin > Cc: Wang, Jian J; Ni, Ray > Subject: Re: [edk2-devel] [PATCH v3] MdeModulePkg/SdDxe: Check the Token > to avoid null pointer >=20 > > -----Original Message----- > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > > Guomin Jiang > > Sent: Thursday, March 26, 2020 2:43 PM > > To: devel@edk2.groups.io > > Cc: Wang, Jian J; Wu, Hao A; Ni, Ray > > Subject: [edk2-devel] [PATCH v3] MdeModulePkg/SdDxe: Check the Token t= o > > avoid null pointer > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2286 > > > > Token pointer may be NULL, it should be checked before use it. >=20 >=20 > Reviewed-by: Hao A Wu Patch pushed via commit 695d90b9b1. Best Regards, Hao Wu >=20 > Best Regards, > Hao Wu >=20 >=20 > > > > Cc: Jian J Wang > > Cc: Hao A Wu > > Cc: Ray Ni > > Signed-off-by: Guomin Jiang > > --- > > MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c > > b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c > > index 9f42abe7e2..721f264377 100644 > > --- a/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c > > +++ b/MdeModulePkg/Bus/Sd/SdDxe/SdBlockIo.c > > @@ -1367,7 +1367,14 @@ 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_INFO, > > > > + "SdEraseBlocks(): Lba 0x%x BlkNo 0x%x Event %p with %r\n", > > > > + Lba, > > > > + BlockNum, > > > > + (Token !=3D NULL) ? Token->Event : NULL, > > > > + Status > > > > + )); > > > > > > > > return Status; > > > > } > > > > -- > > 2.25.1.windows.1 > > > > > > -=3D-=3D-=3D-=3D-=3D-=3D > > Groups.io Links: You receive all messages sent to this group. > > > > View/Reply Online (#56363): https://edk2.groups.io/g/devel/message/563= 63 > > Mute This Topic: https://groups.io/mt/72558979/1768737 > > Group Owner: devel+owner@edk2.groups.io > > Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com= ] > > -=3D-=3D-=3D-=3D-=3D-=3D >=20 >=20 >=20