3.5.7.29 -stable review patch. If anyone has any objections, please let me know. ------------------ From: Luis Henriques <luis.henriques@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx> Signed-off-by: Luis Henriques <luis.henriques@xxxxxxxxxxxxx> --- 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 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html