mm/mempolicy: weighted interleave checks wrong parameter
Subsystems (2)
PATCH 1/1 mm/mempolicy: weighted interleave checks wrong parameter
Hi Andrew,
Can you add this hotfix to d866f3b594ce3324947fef017bbbec1f4eb237ea on linux-next? This was reported after you picked up the patch line. Can probably be squashed, wasn't worth a full version.
~Gregory
---
weighted interleave presently checks (!node) when it should check (!il_weight). This causes a wrong distribution of memory.
Reported-by "Huang, Ying" <[email protected]>
Signed-off-by Gregory Price <[email protected]>
--- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mempolicy.c +1 -1
@@ -1885,7 +1885,7 @@ static unsigned int weighted_interleave_nodes(struct mempolicy *policy)/* to prevent miscount use tsk->mems_allowed_seq to detect rebind */ cpuset_mems_cookie =read_mems_allowed_begin (); node = current->il_prev; -if (!node || !node_isset (node, policy->nodes)) { +if (!current->il_weight || !node_isset (node, policy->nodes)) { node =next_node_in (node, policy->nodes);if (read_mems_allowed_retry (cpuset_mems_cookie)) goto retry;
Signature · 1 line
2.39.1