[folded-merged] mm-add-mremap_dontunmap-to-mremap-v6.patch removed from -mm tree

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

 



The patch titled
     Subject: mm-add-mremap_dontunmap-to-mremap-v6
has been removed from the -mm tree.  Its filename was
     mm-add-mremap_dontunmap-to-mremap-v6.patch

This patch was dropped because it was folded into mm-add-mremap_dontunmap-to-mremap.patch

------------------------------------------------------
From: Brian Geffon <bgeffon@xxxxxxxxxx>
Subject: mm-add-mremap_dontunmap-to-mremap-v6

- Code cleanup suggested by Kirill.
- Correct commit message to more accurately reflect the behavior.
- Clear VM_LOCKED and VM_LOCKEDONFAULT on the old vma.
           
Link: http://lkml.kernel.org/r/20200218173221.237674-1-bgeffon@xxxxxxxxxx
Signed-off-by: Brian Geffon <bgeffon@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: "Michael S . Tsirkin" <mst@xxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: Sonny Rao <sonnyrao@xxxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>
Cc: Yu Zhao <yuzhao@xxxxxxxxxx>
Cc: Jesse Barnes <jsbarnes@xxxxxxxxxx>
Cc: Nathan Chancellor <natechancellor@xxxxxxxxx>
Cc: Florian Weimer <fweimer@xxxxxxxxxx>
Cc: "Kirill A . Shutemov" <kirill@xxxxxxxxxxxxx>
Cc: Lokesh Gidra <lokeshgidra@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/mremap.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/mm/mremap.c~mm-add-mremap_dontunmap-to-mremap-v6
+++ a/mm/mremap.c
@@ -426,8 +426,13 @@ static unsigned long move_vma(struct vm_
 		 * for old_len, but we're now adding new_len - old_len locked
 		 * bytes to the new mapping.
 		 */
-		if (new_len > old_len)
+		if (vm_flags & VM_LOCKED && new_len > old_len) {
 			mm->locked_vm += (new_len - old_len) >> PAGE_SHIFT;
+			*locked = true;
+		}
+
+		/* We always clear VM_LOCKED[ONFAULT] on the old vma */
+		vma->vm_flags &= VM_LOCKED_CLEAR_MASK;
 
 		goto out;
 	}
@@ -686,7 +691,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, a
 	if (down_write_killable(&current->mm->mmap_sem))
 		return -EINTR;
 
-	if (flags & MREMAP_FIXED || flags & MREMAP_DONTUNMAP) {
+	if (flags & (MREMAP_FIXED | MREMAP_DONTUNMAP)) {
 		ret = mremap_to(addr, old_len, new_addr, new_len,
 				&locked, flags, &uf, &uf_unmap_early,
 				&uf_unmap);
_

Patches currently in -mm which might be from bgeffon@xxxxxxxxxx are

mm-add-mremap_dontunmap-to-mremap.patch
mm-add-mremap_dontunmap-to-mremap-v7.patch
selftest-add-mremap_dontunmap-selftest.patch
selftest-add-mremap_dontunmap-selftest-v7.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