
HULK inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBJCOJ CVE: NA -------------------------------- Similar to normal hugetlb page, dynamic pool hugetlb page also need be marked as dirty when freed, ensuring that the icache consistency is maintained in __set_pte_at(). This prevents illegal instruction issues that may arise when the corresponding icache is reused in the future. Fixes: 8ce9d44df8ec ("mm/dynamic_pool: support HugeTLB page allocation from dpool") Signed-off-by: Tong Tiangen <tongtiangen@huawei.com> --- mm/hugetlb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index b94470b4cfc1..0318c97df14c 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1952,6 +1952,7 @@ void free_huge_folio(struct folio *folio) pages_per_huge_page(h), folio); mem_cgroup_uncharge(folio); if (page_from_dynamic_pool(folio_page(folio, 0))) { + arch_clear_hugepage_flags(&folio->page); list_del(&folio->lru); spin_unlock_irqrestore(&hugetlb_lock, flags); dynamic_pool_free_hugepage(folio, restore_reserve); -- 2.25.1