public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>
Cc: "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg AtaAtapiPassThru: Skip the potential NULL pointer access
Date: Tue, 16 Nov 2021 03:48:19 +0000	[thread overview]
Message-ID: <DM6PR11MB4025A357E81E29EB0127F424CA999@DM6PR11MB4025.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211116025328.1604-1-gaoliming@byosoft.com.cn>

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming
> Sent: Tuesday, November 16, 2021 10:53 AM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>
> Subject: [edk2-devel] [PATCH] MdeModulePkg AtaAtapiPassThru: Skip the
> potential NULL pointer access
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3732
> Recent change c974257821208fc6191779d1ddea918499f165b8 exposes this
> potential issue.


Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> 
> Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> ---
>  MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
> b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
> index 7626bac38d..bda900a161 100644
> --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
> +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
> @@ -885,6 +885,13 @@ AhciPrintStatusBlock (
>    IN UINT32                DebugLevel
>    )
>  {
> +  //
> +  // Skip NULL pointer
> +  //
> +  if (AtaStatusBlock == NULL) {
> +    return;
> +  }
> +
>    //
>    // Only print status and error since we have all of the rest printed as
>    // a part of command block print.
> --
> 2.27.0.windows.1
> 
> 
> 
> 
> 
> 


  reply	other threads:[~2021-11-16  3:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16  2:53 [PATCH] MdeModulePkg AtaAtapiPassThru: Skip the potential NULL pointer access gaoliming
2021-11-16  3:48 ` Wu, Hao A [this message]
2021-11-23 13:10 ` [edk2-devel] " Rebecca Cran
2021-11-23 13:19   ` edk2-stable202111 " Leif Lindholm
2021-11-24  6:17     ` 回复: " gaoliming

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=DM6PR11MB4025A357E81E29EB0127F424CA999@DM6PR11MB4025.namprd11.prod.outlook.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