mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-07 19:45:07 +02:00
MdeModulePkg/PiSmmCore: Fix an assert issue in pool free
Following check-in caused this issue: 2930ef9809976ce693d1d377851344c3b06bd926 This issue is caused by assigning incorrect value to PoolHdr.Size if the requested size is more than MAX_POOL_SIZE, because the SMM core will actually allocate page memory instead of pool memory in this situation. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Wu Hao <hao.a.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Wu Hao <hao.a.wu@intel.com> Tested-by: Wu Hao <hao.a.wu@intel.com>
This commit is contained in:
parent
e259779974
commit
94edadf502
@ -287,7 +287,7 @@ SmmInternalAllocatePool (
|
||||
|
||||
PoolHdr = (POOL_HEADER*)(UINTN)Address;
|
||||
PoolHdr->Signature = POOL_HEAD_SIGNATURE;
|
||||
PoolHdr->Size = Size;
|
||||
PoolHdr->Size = EFI_PAGES_TO_SIZE (NoPages);
|
||||
PoolHdr->Available = FALSE;
|
||||
PoolHdr->Type = PoolType;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user