提交 18dddc5e 编写于 作者: Z zhong jiang 提交者: Xie XiuQi

mm/mempolicy: Fix an incorrect rebind node in mpol_rebind_nodemask

euler inclusion
category: bugfix
bugzilla: 16085
CVE: NA

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

Commit 213980c0 ("mm, mempolicy: simplify rebinding mempolicies when updating cpusets")
introduce an numa bind issue. when set the cpuset.mem_allowed,
A process will rebind the specified policy more than one times.
if the cpuset_mems_allowed is not equal to user specified nodes. it will
result in the wrong policy which allocating much memory from wrong node.

Fixes: 213980c0 ("mm, mempolicy: simplify rebinding mempolicies when updating cpusets")
Signed-off-by: Nzhong jiang <zhongjiang@huawei.com>
Reviewed-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 93b125cd
...@@ -345,7 +345,7 @@ static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes) ...@@ -345,7 +345,7 @@ static void mpol_rebind_nodemask(struct mempolicy *pol, const nodemask_t *nodes)
else { else {
nodes_remap(tmp, pol->v.nodes,pol->w.cpuset_mems_allowed, nodes_remap(tmp, pol->v.nodes,pol->w.cpuset_mems_allowed,
*nodes); *nodes);
pol->w.cpuset_mems_allowed = tmp; pol->w.cpuset_mems_allowed = *nodes;
} }
if (nodes_empty(tmp)) if (nodes_empty(tmp))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册