[3.5.y.z extended stable] Patch "Revert "mm: ensure get_unmapped_area() returns higher address than" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Jan 8 14:21:19 UTC 2014


This is a note to let you know that I have just added a patch titled

    Revert "mm: ensure get_unmapped_area() returns higher address than

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 703164f573f3029bfe79597a26e51384fa85b0bb Mon Sep 17 00:00:00 2001
From: Luis Henriques <luis.henriques at canonical.com>
Date: Tue, 7 Jan 2014 10:33:04 +0000
Subject: Revert "mm: ensure get_unmapped_area() returns higher address than
 mmap_min_addr"

This reverts commit 745545489d25d1b9ecf2d78a8f9a31a362806d2d, which is
commit 2afc745f3e3079ab16c826be4860da2529054dd2 upstream.

According to Akira, the backport for the 3.5 kernel was insufficient to
solve the problem.  Thus, this is being reverted and a complete fix will be
applied.

Cc: Akira Takeuchi <takeuchi.akr at jp.panasonic.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 mm/mmap.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index 758ff55..7e24763 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1443,7 +1443,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
 	struct vm_area_struct *vma;
 	unsigned long start_addr;

-	if (len > TASK_SIZE - mmap_min_addr)
+	if (len > TASK_SIZE)
 		return -ENOMEM;

 	if (flags & MAP_FIXED)
@@ -1452,7 +1452,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
 	if (addr) {
 		addr = PAGE_ALIGN(addr);
 		vma = find_vma(mm, addr);
-		if (TASK_SIZE - len >= addr && addr >= mmap_min_addr &&
+		if (TASK_SIZE - len >= addr &&
 		    (!vma || addr + len <= vma->vm_start))
 			return addr;
 	}
@@ -1517,7 +1517,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
 	unsigned long addr = addr0, start_addr;

 	/* requested length too big for entire address space */
-	if (len > TASK_SIZE - mmap_min_addr)
+	if (len > TASK_SIZE)
 		return -ENOMEM;

 	if (flags & MAP_FIXED)
@@ -1527,7 +1527,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
 	if (addr) {
 		addr = PAGE_ALIGN(addr);
 		vma = find_vma(mm, addr);
-		if (TASK_SIZE - len >= addr && addr >= mmap_min_addr &&
+		if (TASK_SIZE - len >= addr &&
 				(!vma || addr + len <= vma->vm_start))
 			return addr;
 	}
--
1.8.3.2





More information about the kernel-team mailing list