Merge tag 'v3.10.108' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / mm / mmap.c
index 740b4ff2fd92064748e1cd4f6681ee73365f1f25..5d7dc16f9b83200f33d8b432e2f98aacca227d25 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2139,7 +2139,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address)
 
        /* Guard against exceeding limits of the address space. */
        address &= PAGE_MASK;
-       if (address >= TASK_SIZE)
+       if (address >= (TASK_SIZE & PAGE_MASK))
                return -ENOMEM;
        address += PAGE_SIZE;