Reviewed-by: Jiewen Yao <jiewen....@intel.com> > -----Original Message----- > From: Xu, Min M <min.m...@intel.com> > Sent: Wednesday, January 18, 2023 4:42 PM > To: devel@edk2.groups.io > Cc: Xu, Min M <min.m...@intel.com>; Gao, Liming > <gaolim...@byosoft.com.cn>; Bi, Dandan <dandan...@intel.com>; Aktas, > Erdem <erdemak...@google.com>; James Bottomley <j...@linux.ibm.com>; > Yao, Jiewen <jiewen....@intel.com>; Gerd Hoffmann <kra...@redhat.com>; > Tom Lendacky <thomas.lenda...@amd.com>; Michael Roth > <michael.r...@amd.com> > Subject: [PATCH V1 1/1] MdeModulePkg: EfiUnacceptedMemoryType is not > allowed in AllocatePool > > From: Min M Xu <min.m...@intel.com> > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4315 > > MemoryType of EfiUnacceptedMemoryType should not be allocated in > AllocatePool. Instead it should return EFI_INVALID_PARAMETER. > > Cc: Liming Gao <gaolim...@byosoft.com.cn> > Cc: Dandan Bi <dandan...@intel.com> > Cc: Erdem Aktas <erdemak...@google.com> > Cc: James Bottomley <j...@linux.ibm.com> > Cc: Jiewen Yao <jiewen....@intel.com> > Cc: Gerd Hoffmann <kra...@redhat.com> > Cc: Tom Lendacky <thomas.lenda...@amd.com> > Cc: Michael Roth <michael.r...@amd.com> > Reported-by: Liming Gao <gaolim...@byosoft.com.cn> > Signed-off-by: Min Xu <min.m...@intel.com> > --- > MdeModulePkg/Core/Dxe/Mem/Pool.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Core/Dxe/Mem/Pool.c > b/MdeModulePkg/Core/Dxe/Mem/Pool.c > index 7aaf501600cf..b20cbfdedbab 100644 > --- a/MdeModulePkg/Core/Dxe/Mem/Pool.c > +++ b/MdeModulePkg/Core/Dxe/Mem/Pool.c > @@ -213,7 +213,7 @@ CoreInternalAllocatePool ( > // If it's not a valid type, fail it > // > if (((PoolType >= EfiMaxMemoryType) && (PoolType < > MEMORY_TYPE_OEM_RESERVED_MIN)) || > - (PoolType == EfiConventionalMemory) || (PoolType == > EfiPersistentMemory)) > + (PoolType == EfiConventionalMemory) || (PoolType == > EfiPersistentMemory) || (PoolType == EfiUnacceptedMemoryType)) > { > return EFI_INVALID_PARAMETER; > } > -- > 2.29.2.windows.2
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#98793): https://edk2.groups.io/g/devel/message/98793 Mute This Topic: https://groups.io/mt/96350145/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-