Commit 97607032 authored by Ma Wupeng's avatar Ma Wupeng Committed by Jialin Zhang
Browse files

mm: mem_reliable: Initialize reliable_nr_page when mm_init()

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6RKHX


CVE: NA

--------------------------------

After the fork operation, it is erroneous for the child process to have a
reliable page size twice that of its parent process.

Upon examining the mm_struct structure, it was discovered that
reliable_nr_page should be initialized to 0, similar to how RSS is
initialized during mm_init(). This particular problem that arises during
forking is merely one such example.

To resolve this issue, it is recommended to set reliable_nr_page to 0
during the mm_init() operation.

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>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent 5b749c1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment