]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/mmap.c
Merge tag 'tty-4.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[karo-tx-linux.git] / mm / mmap.c
index 7fa6759322d1f2aa39f9dc2c497e714a8d9566f0..f19efcf7541878093eb3c3323a597cf8d1da5ae2 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2231,7 +2231,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;