
From: Ma Wupeng <mawupeng1@huawei.com> hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I77BDW CVE: NA -------------------------------- During copy_present_pte, rss counter is increased but the corresponding reliable page counter is not updated. This will lead to reliable page counter mismatch. Fix this by adding reliable page counter. Fixes: d81e9624de21 ("proc: Count reliable memory usage of reliable tasks") Signed-off-by: Ma Wupeng <mawupeng1@huawei.com> Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> Reviewed-by: Nanyong Sun <sunnanyong@huawei.com> --- mm/memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memory.c b/mm/memory.c index 5941a4f4ea4b..5893c178251a 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -887,6 +887,7 @@ copy_present_pte(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma, get_page(page); page_dup_rmap(page, false); rss[mm_counter(page)]++; + reliable_page_counter(page, dst_vma->vm_mm, 1); } /* -- 2.25.1