[PATCH OLK-6.6] mm/dpool: mark dpool hugetlb page as dirty in free_huge_folio()

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

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17724 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/K5R... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/17724 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/K5R...
participants (2)
-
patchwork bot
-
Tong Tiangen