lkml.org 
[lkml]   [2014]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3.5 67/96] Revert "mm: ensure get_unmapped_area() returns higher address than mmap_min_addr"
Date
3.5.7.29 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Luis Henriques <luis.henriques@canonical.com>

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@jp.panasonic.com>
Signed-off-by: Luis Henriques <luis.henriques@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


\
 
 \ /
  Last update: 2014-01-13 16:01    [W:0.430 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site