Skip to contentSkip to conversation

mm-mremap-use-vma_lookup-in-vma_to_resize.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 6, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/mremap: use vma_lookup() in vma_to_resize()
has been removed from the -mm tree. Its filename was
mm-mremap-use-vma_lookup-in-vma_to_resize.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Liam Howlett <[email protected]>
Subject: mm/mremap: use vma_lookup() in vma_to_resize()

Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated.

---

 mm/mremap.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
mm/mremap.c renamed from mm/mremap.c~mm-mremap-use-vma_lookup-in-vma_to_resize +3 -2
@@ -634,10 +634,11 @@ static struct vm_area_struct *vma_to_res
 	unsigned long *p)
 {
 	struct mm_struct *mm = current->mm;
-	struct vm_area_struct *vma = find_vma(mm, addr);
+	struct vm_area_struct *vma;
 	unsigned long pgoff;
 
-	if (!vma || vma->vm_start > addr)
+	vma = vma_lookup(mm, addr);
+	if (!vma)
 		return ERR_PTR(-EFAULT);
 
 	/*

_

Patches currently in -mm which might be from [email protected] are