提交 a66281c5 编写于 作者: X Xu Qiang 提交者: Zhang Zekun

mm/sharepool: Add sp_group_sem protection.

hulk inclusion
category: other
bugzilla: https://gitee.com/openeuler/kernel/issues/I6GI0X

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

In sp_update_process_stat, traverse node_list
and lock protection is required.
Signed-off-by: NXu Qiang <xuqiang36@huawei.com>
上级 7843fb44
......@@ -841,8 +841,11 @@ static void sp_update_process_stat(struct task_struct *tsk, bool inc,
unsigned long size = spa->real_size;
enum spa_type type = spa->type;
down_read(&sp_group_sem);
spg_node = find_spg_node_by_spg(tsk->mm, spa->spg);
update_mem_usage(size, inc, spa->is_hugepage, spg_node, type);
if (spg_node != NULL)
update_mem_usage(size, inc, spa->is_hugepage, spg_node, type);
up_read(&sp_group_sem);
}
static inline void check_interrupt_context(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册