NOMMU: Fix __get_user_pages() to pin last page on offset buffers
[linux-2.6.git] / mm / nommu.c
index 089982f..63fa17d 100644 (file)
@@ -162,7 +162,7 @@ int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                }
                if (vmas)
                        vmas[i] = vma;
-               start += PAGE_SIZE;
+               start = (start + PAGE_SIZE) & PAGE_MASK;
        }
 
        return i;