The patch titled Subject: mm/mempolicy.c: fix an incorrect rebind node in mpol_rebind_nodemask has been added to the -mm tree. Its filename is mm-mempolicy-fix-an-incorrect-rebind-node-in-mpol_rebind_nodemask.patch
This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-mempolicy-fix-an-incorrect-rebin... and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-mempolicy-fix-an-incorrect-rebin...
Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------ From: zhong jiang zhongjiang@huawei.com Subject: mm/mempolicy.c: fix an incorrect rebind node in mpol_rebind_nodemask
We bind an different node to different vma, Unluckily, it will bind a different vma to the same node by checking /proc/pid/numa_maps.
213980c0f23b ("mm, mempolicy: simplify rebinding mempolicies when updating cpusets") introduced the issue. When we change memory policy by setting cpuset.mems, a process will rebind the specified policy more than one time. If cpuset_mems_allowed is not equal to the user specified nodes the issue will trigger. This may result in an OOM when allocating memory from the same node.
Link: http://lkml.kernel.org/r/1558768043-23184-1-git-send-email-zhongjiang@huawei... Fixes: 213980c0f23b ("mm, mempolicy: simplify rebinding mempolicies when updating cpusets") Signed-off-by: zhong jiang zhongjiang@huawei.com Cc: Oscar Salvador osalvador@suse.de Cc: Anshuman Khandual khandual@linux.vnet.ibm.com Cc: Michal Hocko mhocko@suse.com Cc: Mel Gorman mgorman@techsingularity.net Cc: Andrea Arcangeli aarcange@redhat.com Cc: Ralph Campbell rcampbell@nvidia.com Cc: Vlastimil Babka vbabka@suse.cz Cc: stable@vger.kernel.org Signed-off-by: Andrew Morton akpm@linux-foundation.org ---
mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/mempolicy.c~mm-mempolicy-fix-an-incorrect-rebind-node-in-mpol_rebind_nodemask +++ a/mm/mempolicy.c @@ -306,7 +306,7 @@ static void mpol_rebind_nodemask(struct else { nodes_remap(tmp, pol->v.nodes,pol->w.cpuset_mems_allowed, *nodes); - pol->w.cpuset_mems_allowed = tmp; + pol->w.cpuset_mems_allowed = *nodes; }
if (nodes_empty(tmp)) _
Patches currently in -mm which might be from zhongjiang@huawei.com are
mm-mempolicy-fix-an-incorrect-rebind-node-in-mpol_rebind_nodemask.patch
linux-stable-mirror@lists.linaro.org