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

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: 6ede0f004ac6 ("mm/dynamic_hugetlb: free huge pages to dhugetlb_pool") 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 1369aeab8885..bed9f05ecaf1 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1598,6 +1598,7 @@ void free_huge_page(struct page *page) if (dhugetlb_enabled && PagePool(page)) { spin_lock_irqsave(&hugetlb_lock, flags); + arch_clear_hugepage_flags(page); ClearHPageMigratable(page); list_del(&page->lru); hugetlb_cgroup_uncharge_page(hstate_index(h), -- 2.25.1

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/17723 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/WVQ... 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/17723 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/WVQ...
participants (2)
-
patchwork bot
-
Tong Tiangen