-
- Downloads
mm: use long type for page counts in mm_populate() and get_user_pages()
Use long type for page counts in mm_populate() so as to avoid integer overflow when running the following test code: int main(void) { void *p = mmap(NULL, 0x100000000000, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0); printf("p: %p\n", p); mlockall(MCL_CURRENT); printf("done\n"); return 0; } Signed-off-by:Michel Lespinasse <walken@google.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Rik van Riel <riel@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Hugh Dickins <hughd@google.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- include/linux/hugetlb.h 3 additions, 3 deletionsinclude/linux/hugetlb.h
- include/linux/mm.h 8 additions, 7 deletionsinclude/linux/mm.h
- mm/hugetlb.c 6 additions, 6 deletionsmm/hugetlb.c
- mm/memory.c 9 additions, 9 deletionsmm/memory.c
- mm/mlock.c 2 additions, 2 deletionsmm/mlock.c
- mm/nommu.c 8 additions, 7 deletionsmm/nommu.c
Loading
Please register or sign in to comment