All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] mm-change-munmap-splitting-order-and-move_vma-fix.patch removed from -mm tree
@ 2023-02-10  0:45 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-02-10  0:45 UTC (permalink / raw)
  To: mm-commits, sanan.hasanov, Liam.Howlett, akpm


The quilt patch titled
     Subject: mm/mremap: fix vma iterator initialization
has been removed from the -mm tree.  Its filename was
     mm-change-munmap-splitting-order-and-move_vma-fix.patch

This patch was dropped because it was folded into mm-change-munmap-splitting-order-and-move_vma.patch

------------------------------------------------------
From: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Subject: mm/mremap: fix vma iterator initialization
Date: Thu, 26 Jan 2023 16:20:11 -0500

The vma iterator location is incorrect when there is a failure in the
move_vma() function which alters the address being modified.

Delay the initialization of the vma iterator until the address is stable.

Link: https://lkml.kernel.org/r/20230126212011.980350-1-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reported-by: Sanan Hasanov <sanan.hasanov@Knights.ucf.edu>
  Link: https://lore.kernel.org/linux-mm/IA1PR07MB98306BC0F55667A760EABE91ABCE9@IA1PR07MB9830.namprd07.prod.outlook.com/
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---


--- a/mm/mremap.c~mm-change-munmap-splitting-order-and-move_vma-fix
+++ a/mm/mremap.c
@@ -585,7 +585,7 @@ static unsigned long move_vma(struct vm_
 	unsigned long hiwater_vm;
 	int err = 0;
 	bool need_rmap_locks;
-	VMA_ITERATOR(vmi, mm, old_addr);
+	struct vma_iterator vmi;
 
 	/*
 	 * We'd prefer to avoid failure later on in do_munmap:
@@ -701,6 +701,7 @@ static unsigned long move_vma(struct vm_
 		return new_addr;
 	}
 
+	vma_iter_init(&vmi, mm, old_addr);
 	if (do_vmi_munmap(&vmi, mm, old_addr, old_len, uf_unmap, false) < 0) {
 		/* OOM: unable to split vma, just get accounts right */
 		if (vm_flags & VM_ACCOUNT && !(flags & MREMAP_DONTUNMAP))
_

Patches currently in -mm which might be from Liam.Howlett@oracle.com are

maple_tree-fix-handle-of-invalidated-state-in-mas_wr_store_setup.patch
maple_tree-fix-mas_prev-and-mas_find-state-handling.patch
ipc-shm-introduce-new-do_vma_munmap-to-munmap.patch
nommu-pass-through-vma-iterator-to-shrink_vma.patch
mm-damon-vaddr-testh-stop-using-vma_mas_store-for-maple-tree-store.patch
mm-change-munmap-splitting-order-and-move_vma.patch
mm-mremap-convert-vma_adjust-to-vma_expand.patch
mm-mmap-remove-__vma_adjust-fix.patch


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

only message in thread, other threads:[~2023-02-10  0:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10  0:45 [folded-merged] mm-change-munmap-splitting-order-and-move_vma-fix.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.