aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mprotect.c
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2013-02-22 16:35:55 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-23 17:50:22 -0800
commit28a35716d317980ae9bc2ff2f84c33a3cda9e884 (patch)
treea69307192d34334c6869cfe33b6fea4e358de718 /mm/mprotect.c
parentmm: accurately document nr_free_*_pages functions with code comments (diff)
downloadlinux-dev-28a35716d317980ae9bc2ff2f84c33a3cda9e884.tar.xz
linux-dev-28a35716d317980ae9bc2ff2f84c33a3cda9e884.zip
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>
Diffstat (limited to 'mm/mprotect.c')
0 files changed, 0 insertions, 0 deletions