stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-mempolicy-fix-an-incorrect-rebind-node-in-mpol_rebind_nodemask.patch added to -mm tree
@ 2019-05-25 18:30 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2019-05-25 18:30 UTC (permalink / raw)
  To: aarcange, khandual, mgorman, mhocko, mm-commits, osalvador,
	rcampbell, stable, vbabka, zhongjiang


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-rebind-node-in-mpol_rebind_nodemask.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-mempolicy-fix-an-incorrect-rebind-node-in-mpol_rebind_nodemask.patch

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.com
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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-25 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-25 18:30 + mm-mempolicy-fix-an-incorrect-rebind-node-in-mpol_rebind_nodemask.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).