diff options
author | Jian J Wang <jian.j.wang@intel.com> | 2017-11-20 09:00:27 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2017-11-20 13:06:32 +0800 |
commit | 94edadf502bd0e61f00bb08a5df2e078af54a770 (patch) | |
tree | 2ccc50f59b65f6102d8021d306b6e4b299ec8e74 /MdeModulePkg/Core/PiSmmCore | |
parent | e259779974ea7e109ee75b9b853f73bd0f66a4b3 (diff) | |
download | edk2-94edadf502bd0e61f00bb08a5df2e078af54a770.tar.gz edk2-94edadf502bd0e61f00bb08a5df2e078af54a770.tar.bz2 edk2-94edadf502bd0e61f00bb08a5df2e078af54a770.zip |
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>
Diffstat (limited to 'MdeModulePkg/Core/PiSmmCore')
-rw-r--r-- | MdeModulePkg/Core/PiSmmCore/Pool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c b/MdeModulePkg/Core/PiSmmCore/Pool.c index e77caa8853..e98ce01b0f 100644 --- a/MdeModulePkg/Core/PiSmmCore/Pool.c +++ b/MdeModulePkg/Core/PiSmmCore/Pool.c @@ -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;
|