* [merged mm-stable] mm-vma-introduce-abort_munmap_vmas.patch removed from -mm tree
@ 2024-09-04 4:19 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-09-04 4:19 UTC (permalink / raw)
To: mm-commits, willy, vbabka, surenb, spasswolf, sidhartha.kumar,
paul, paulmck, olsajiri, lstoakes, lorenzo.stoakes, Liam.Howlett,
kees, jeffxu, broonie, Liam.Howlett, akpm
The quilt patch titled
Subject: mm/vma: introduce abort_munmap_vmas()
has been removed from the -mm tree. Its filename was
mm-vma-introduce-abort_munmap_vmas.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: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
Subject: mm/vma: introduce abort_munmap_vmas()
Date: Fri, 30 Aug 2024 00:00:42 -0400
Extract clean up of failed munmap() operations from do_vmi_align_munmap().
This simplifies later patches in the series.
It is worth noting that the mas_for_each() loop now has a different upper
limit. This should not change the number of vmas visited for reattaching
to the main vma tree (mm_mt), as all vmas are reattached in both
scenarios.
Link: https://lkml.kernel.org/r/20240830040101.822209-3-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Bert Karwatzki <spasswolf@web.de>
Cc: Jeff Xu <jeffxu@chromium.org>
Cc: Jiri Olsa <olsajiri@gmail.com>
Cc: Kees Cook <kees@kernel.org>
Cc: Lorenzo Stoakes <lstoakes@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vma.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
--- a/mm/vma.c~mm-vma-introduce-abort_munmap_vmas
+++ a/mm/vma.c
@@ -669,6 +669,22 @@ again:
}
/*
+ * abort_munmap_vmas - Undo any munmap work and free resources
+ *
+ * Reattach any detached vmas and free up the maple tree used to track the vmas.
+ */
+static inline void abort_munmap_vmas(struct ma_state *mas_detach)
+{
+ struct vm_area_struct *vma;
+
+ mas_set(mas_detach, 0);
+ mas_for_each(mas_detach, vma, ULONG_MAX)
+ vma_mark_detached(vma, false);
+
+ __mt_destroy(mas_detach->tree);
+}
+
+/*
* do_vmi_align_munmap() - munmap the aligned region from @start to @end.
* @vmi: The vma iterator
* @vma: The starting vm_area_struct
@@ -834,11 +850,7 @@ clear_tree_failed:
userfaultfd_error:
munmap_gather_failed:
end_split_failed:
- mas_set(&mas_detach, 0);
- mas_for_each(&mas_detach, next, end)
- vma_mark_detached(next, false);
-
- __mt_destroy(&mt_detach);
+ abort_munmap_vmas(&mas_detach);
start_split_failed:
map_count_exceeded:
validate_mm(mm);
_
Patches currently in -mm which might be from Liam.Howlett@Oracle.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-04 4:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 4:19 [merged mm-stable] mm-vma-introduce-abort_munmap_vmas.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.