public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Guomin Jiang" <guomin.jiang@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"newexplorerj@gmail.com" <newexplorerj@gmail.com>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>, "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH v2] MdeModulePkg/SdDxe: Potential NULL pointer on Token
Date: Thu, 26 Mar 2020 05:56:52 +0000	[thread overview]
Message-ID: <B1F5B0856690F44595CF70FED755C93954B05B@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <ba350a6d43f41b65059c4bfe3d629be9375af4c9.1583314796.git.newexplorerj@gmail.com>

Hi Ray, Hao

Could you please help review this changes.

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 <newexplorerj@gmail.com>; Wu, Hao A
> <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [edk2-devel] [PATCH v2] MdeModulePkg/SdDxe: Potential NULL
> pointer on Token
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2286
> 
> Token pointer may be NULL, it is should be check before use it.
> 
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: GuoMinJ <newexplorerj@gmail.com>
> ---
>  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 != NULL) && (Token->Event !=
> NULL)) {
> +    DEBUG ((DEBUG_ERROR, "Event pointer is %p\n", Token->Event));  }
> + else {
> +    DEBUG ((DEBUG_ERROR, "Event is meaningless\n"));  }
> 
>    return Status;
>  }
> --
> 2.17.1
> 
> 
> 


  reply	other threads:[~2020-03-26  5:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04  9:41 [PATCH v2] MdeModulePkg/SdDxe: Potential NULL pointer on Token GuoMinJ
2020-03-26  5:56 ` Guomin Jiang [this message]
2020-03-26  6:05   ` [edk2-devel] " Wu, Hao A

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=B1F5B0856690F44595CF70FED755C93954B05B@SHSMSX101.ccr.corp.intel.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