提交 142bfed2 编写于 作者: Z Zhou Guanghui 提交者: Wang Wensheng

mm/sharepool: delete unnecessary judgment

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5PIA2
CVE: NA

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

When a process is added to a group, mm->mm_users increases by one.
When a process is deleted from a group, mm->mm_users decreases by
one. It is not possible to reduce to 0 because this function is
preceded by get_task_mm.
Signed-off-by: NZhou Guanghui <zhouguanghui1@huawei.com>
上级 19896d2c
......@@ -1621,11 +1621,7 @@ int mg_sp_group_del_task(int pid, int spg_id)
list_del(&spg_node->group_node);
mm->sp_group_master->count--;
kfree(spg_node);
if (atomic_sub_and_test(1, &mm->mm_users)) {
up_write(&sp_group_sem);
WARN(1, "Invalid user counting\n");
return -EINVAL;
}
atomic_dec(&mm->mm_users);
up_write(&sp_group_sem);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册