[PATCH v10 30/69] arm64: remove mmap linked list from vdso

Liam Howlett liam.howlett at oracle.com
Tue Jun 21 13:47:02 PDT 2022

From: "Matthew Wilcox (Oracle)" <willy at infradead.org>

Use the VMA iterator instead.

Link: https://lkml.kernel.org/r/20220504011345.662299-15-Liam.Howlett@oracle.com
Signed-off-by: Matthew Wilcox (Oracle) <willy at infradead.org>
Signed-off-by: Liam R. Howlett <Liam.Howlett at Oracle.com>
Acked-by: Vlastimil Babka <vbabka at suse.cz>
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: David Howells <dhowells at redhat.com>
Cc: SeongJae Park <sj at kernel.org>
Cc: Will Deacon <will at kernel.org>
Cc: Davidlohr Bueso <dave at stgolabs.net>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 arch/arm64/kernel/vdso.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index a61fc4f989b3..a8388af62b99 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -136,10 +136,11 @@ int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)
 	struct mm_struct *mm = task->mm;
 	struct vm_area_struct *vma;
+	VMA_ITERATOR(vmi, mm, 0);
-	for (vma = mm->mmap; vma; vma = vma->vm_next) {
+	for_each_vma(vmi, vma) {
 		unsigned long size = vma->vm_end - vma->vm_start;
 		if (vma_is_special_mapping(vma, vdso_info[VDSO_ABI_AA64].dm))

More information about the maple-tree mailing list