+ mm-mempolicy-fix-an-incorrect-rebind-node-in-mpol_rebind_nodemask.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
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@xxxxxxxxxx
Fixes: 213980c0f23b ("mm, mempolicy: simplify rebinding mempolicies when updating cpusets")
Signed-off-by: zhong jiang <zhongjiang@xxxxxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Cc: Anshuman Khandual <khandual@xxxxxxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: Ralph Campbell <rcampbell@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 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@xxxxxxxxxx are

mm-mempolicy-fix-an-incorrect-rebind-node-in-mpol_rebind_nodemask.patch




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux