[folded-merged] mm-mremap-unlink-anon_vmas-when-mremap-with-mremap_dontunmap-success-v2.patch removed from -mm tree

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

 



The patch titled
     Subject: mm: mremap: unlink anon_vmas when mremap with MREMAP_DONTUNMAP success
has been removed from the -mm tree.  Its filename was
     mm-mremap-unlink-anon_vmas-when-mremap-with-mremap_dontunmap-success-v2.patch

This patch was dropped because it was folded into mm-mremap-unlink-anon_vmas-when-mremap-with-mremap_dontunmap-success.patch

------------------------------------------------------
From: Li Xinhai <lixinhai.lxh@xxxxxxxxx>
Subject: mm: mremap: unlink anon_vmas when mremap with MREMAP_DONTUNMAP success

Need to consider the old vma just been partially moved, if so we must keep
the anon_vma links for remaining mapped pages in old vma.

Link: https://lkml.kernel.org/r/20210127083917.309264-2-lixinhai.lxh@xxxxxxxxx
Signed-off-by: Li Xinhai <lixinhai.lxh@xxxxxxxxx>
Cc: Brian Geffon <bgeffon@xxxxxxxxxx>
Cc: Lokesh Gidra <lokeshgidra@xxxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/mremap.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/mremap.c~mm-mremap-unlink-anon_vmas-when-mremap-with-mremap_dontunmap-success-v2
+++ a/mm/mremap.c
@@ -600,7 +600,8 @@ static unsigned long move_vma(struct vm_
 		 * anon_vma links of the old vma is no longer needed after its page
 		 * table has been moved.
 		 */
-		if (new_vma != vma)
+		if (new_vma != vma && vma->vm_start == old_addr &&
+			vma->vm_end == (old_addr + old_len))
 			unlink_anon_vmas(vma);
 
 		/* Because we won't unmap we don't need to touch locked_vm */
_

Patches currently in -mm which might be from lixinhai.lxh@xxxxxxxxx are

mm-rmap-explicitly-reset-vma-anon_vma-in-unlink_anon_vmas.patch
mm-mremap-unlink-anon_vmas-when-mremap-with-mremap_dontunmap-success.patch
mm-hugetlbc-fix-unnecessary-address-expansion-of-pmd-sharing.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux