From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Zeng, Star" <star.zeng@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
Michael Turner <Michael.Turner@microsoft.com>
Subject: Re: [PATCH] MdeModulePkg NvmExpressDxe: return error code in error path
Date: Mon, 23 Apr 2018 11:25:35 +0000 [thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A0931D94E86@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1524471451-26604-1-git-send-email-star.zeng@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
> -----Original Message-----
> From: Zeng, Star
> Sent: Monday, April 23, 2018 4:18 PM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star; Wu, Hao A; Ni, Ruiyu; Michael Turner
> Subject: [PATCH] MdeModulePkg NvmExpressDxe: return error code in error
> path
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=937
>
> In NvmeExpressPassthru.c near line 659:
> Prp = NvmeCreatePrpList (
> PciIo,
> PhyAddr,
> EFI_SIZE_TO_PAGES(Offset + Bytes) - 1,
> &PrpListHost,
> &PrpListNo,
> &MapPrpList
> );
> if (Prp == NULL) {
> goto EXIT;
> }
> Status is not set to an error code - Status is initialized to
> EFI_SUCCESS, or set by a PciIo->Map to EFI_SUCCESS above this
> code. This error path should set Status to an error code before
> goto EXIT.
>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Michael Turner <Michael.Turner@microsoft.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Star Zeng <star.zeng@intel.com>
> ---
> MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
> b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
> index 302cfdcd8d8d..cfad1587f299 100644
> --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
> +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c
> @@ -656,6 +656,7 @@ NvmExpressPassThru (
> PhyAddr = (Sq->Prp[0] + EFI_PAGE_SIZE) & ~(EFI_PAGE_SIZE - 1);
> Prp = NvmeCreatePrpList (PciIo, PhyAddr, EFI_SIZE_TO_PAGES(Offset + Bytes)
> - 1, &PrpListHost, &PrpListNo, &MapPrpList);
> if (Prp == NULL) {
> + Status = EFI_OUT_OF_RESOURCES;
> goto EXIT;
> }
>
> --
> 2.7.0.windows.1
prev parent reply other threads:[~2018-04-23 11:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 8:17 [PATCH] MdeModulePkg NvmExpressDxe: return error code in error path Star Zeng
2018-04-23 11:25 ` Wu, Hao A [this message]
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=B80AF82E9BFB8E4FBD8C89DA810C6A0931D94E86@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