All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-mremap-write-lock-vma-while-remapping-it-to-a-new-address-range.patch removed from -mm tree
@ 2023-04-06  3:03 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-04-06  3:03 UTC (permalink / raw)
  To: mm-commits, laurent.dufour, 42.hyeyoo, surenb, akpm


The quilt patch titled
     Subject: mm/mremap: write-lock VMA while remapping it to a new address range
has been removed from the -mm tree.  Its filename was
     mm-mremap-write-lock-vma-while-remapping-it-to-a-new-address-range.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Suren Baghdasaryan <surenb@google.com>
Subject: mm/mremap: write-lock VMA while remapping it to a new address range
Date: Mon, 27 Feb 2023 09:36:16 -0800

Write-lock VMA as locked before copying it and when copy_vma produces a
new VMA.

Link: https://lkml.kernel.org/r/20230227173632.3292573-18-surenb@google.com
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Laurent Dufour <laurent.dufour@fr.ibm.com>
Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mmap.c   |    1 +
 mm/mremap.c |    1 +
 2 files changed, 2 insertions(+)

--- a/mm/mmap.c~mm-mremap-write-lock-vma-while-remapping-it-to-a-new-address-range
+++ a/mm/mmap.c
@@ -3197,6 +3197,7 @@ struct vm_area_struct *copy_vma(struct v
 			get_file(new_vma->vm_file);
 		if (new_vma->vm_ops && new_vma->vm_ops->open)
 			new_vma->vm_ops->open(new_vma);
+		vma_start_write(new_vma);
 		if (vma_link(mm, new_vma))
 			goto out_vma_link;
 		*need_rmap_locks = false;
--- a/mm/mremap.c~mm-mremap-write-lock-vma-while-remapping-it-to-a-new-address-range
+++ a/mm/mremap.c
@@ -623,6 +623,7 @@ static unsigned long move_vma(struct vm_
 			return -ENOMEM;
 	}
 
+	vma_start_write(vma);
 	new_pgoff = vma->vm_pgoff + ((old_addr - vma->vm_start) >> PAGE_SHIFT);
 	new_vma = copy_vma(&vma, new_addr, new_len, new_pgoff,
 			   &need_rmap_locks);
_

Patches currently in -mm which might be from surenb@google.com are



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

only message in thread, other threads:[~2023-04-06  3:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06  3:03 [merged mm-stable] mm-mremap-write-lock-vma-while-remapping-it-to-a-new-address-range.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.