]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
authorAndrea Arcangeli <aarcange@redhat.com>
Wed, 24 Aug 2011 23:47:19 +0000 (09:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 1 Sep 2011 03:28:52 +0000 (13:28 +1000)
mm/huge_memory.c

index fffab174f3e76bb7def297ef5649882aedbcf958..6b072bdccf817d1ec223a96ba0209ff2eab3cd51 100644 (file)
@@ -1064,7 +1064,7 @@ int move_huge_pmd(struct vm_area_struct *vma, struct vm_area_struct *new_vma,
 
        if ((old_addr & ~HPAGE_PMD_MASK) ||
            (new_addr & ~HPAGE_PMD_MASK) ||
-           (old_addr + HPAGE_PMD_SIZE) > old_end ||
+           old_end - old_addr < HPAGE_PMD_SIZE ||
            (new_vma->vm_flags & VM_NOHUGEPAGE))
                goto out;