From: "Wu, Hao A" <hao.a.wu@intel.com>
To: Jeff Brasen <jbrasen@nvidia.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Ni, Ray" <ray.ni@intel.com>
Subject: Re: [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: Add NULL pointer check
Date: Tue, 15 Sep 2020 01:47:54 +0000 [thread overview]
Message-ID: <BYAPR11MB3670F466445AE9B6FF8EC1D1CA200@BYAPR11MB3670.namprd11.prod.outlook.com> (raw)
In-Reply-To: <3e6a774a62a4ef92fcdfb5e156e2abc4c440d35e.1599844505.git.jbrasen@nvidia.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Best Regards,
Hao Wu
> -----Original Message-----
> From: Jeff Brasen <jbrasen@nvidia.com>
> Sent: Saturday, September 12, 2020 1:17 AM
> To: devel@edk2.groups.io
> Cc: Wu, Hao A <hao.a.wu@intel.com>; Ni, Ray <ray.ni@intel.com>; Jeff
> Brasen <jbrasen@nvidia.com>
> Subject: [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: Add NULL
> pointer check
>
> Add check for NULL HostAddress in AllocateBuffer as required by UEFI
> specification.
>
> Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
> ---
> .../NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> PciDeviceIo.c
> b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> PciDeviceIo.c
> index a40c1a9593..363c4a765b 100644
> ---
> a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> PciDeviceIo.c
> +++
> b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverable
> Pc
> +++ iDeviceIo.c
> @@ -856,6 +856,10 @@ CoherentPciIoAllocateBuffer (
> return EFI_UNSUPPORTED; } + if (HostAddress == NULL) {+ return
> EFI_INVALID_PARAMETER;+ }+ if ((MemoryType != EfiBootServicesData)
> && (MemoryType != EfiRuntimeServicesData)) { return
> EFI_INVALID_PARAMETER;--
> 2.25.1
next prev parent reply other threads:[~2020-09-15 1:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 17:16 [PATCH] MdeModulePkg/NonDiscoverablePciDeviceDxe: Add NULL pointer check Jeff Brasen
2020-09-15 1:47 ` Wu, Hao A [this message]
2020-09-18 2:47 ` [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=BYAPR11MB3670F466445AE9B6FF8EC1D1CA200@BYAPR11MB3670.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