Commit e70b561e authored by Ma Wupeng's avatar Ma Wupeng Committed by Wupeng Ma
Browse files

mm: mem_reliable: Fix reliable page counter mismatch problem

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: d81e9624 ("proc: Count reliable memory usage of reliable tasks")

Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: default avatarNanyong Sun <sunnanyong@huawei.com>
parent 7b970383
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
	}

	/*