--- a/mm/gup.c~mm-gup-use-helper-page_aligned-in-populate_vma_page_range +++ a/mm/gup.c @@ -1471,8 +1471,8 @@ long populate_vma_page_range(struct vm_a unsigned long nr_pages = (end - start) / PAGE_SIZE; int gup_flags; - VM_BUG_ON(start & ~PAGE_MASK); - VM_BUG_ON(end & ~PAGE_MASK); + VM_BUG_ON(!PAGE_ALIGNED(start)); + VM_BUG_ON(!PAGE_ALIGNED(end)); VM_BUG_ON_VMA(start < vma->vm_start, vma); VM_BUG_ON_VMA(end > vma->vm_end, vma); mmap_assert_locked(mm);