From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Jiang, Guomin" <guomin.jiang@intel.com>
Cc: "Wang, Jian J" <jian.j.wang@intel.com>, "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [edk2-devel] [PATCH v3] MdeModulePkg/SdDxe: Check the Token to avoid null pointer
Date: Thu, 26 Mar 2020 06:51:03 +0000 [thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A093C9C1D6D@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20200326064250.1519-1-guomin.jiang@intel.com>
> -----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 to
> avoid null pointer
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2286
>
> Token pointer may be NULL, it should be checked before use it.
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Signed-off-by: Guomin Jiang <guomin.jiang@intel.com>
> ---
> 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 != NULL) ? Token->Event : NULL,
>
> + Status
>
> + ));
>
>
>
> return Status;
>
> }
>
> --
> 2.25.1.windows.1
>
>
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
>
> View/Reply Online (#56363): https://edk2.groups.io/g/devel/message/56363
> 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]
> -=-=-=-=-=-=
next prev parent reply other threads:[~2020-03-26 6:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 6:42 [PATCH v3] MdeModulePkg/SdDxe: Check the Token to avoid null pointer Guomin Jiang
2020-03-26 6:51 ` Wu, Hao A [this message]
2020-03-27 1:06 ` [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=B80AF82E9BFB8E4FBD8C89DA810C6A093C9C1D6D@SHSMSX104.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