From: Sasha Levin Date: Sat, 17 May 2014 13:19:30 +0000 (+1000) Subject: mm: remap_file_pages: initialize populate before usage X-Git-Tag: next-20140520~1^2~15 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=51ca6b1ab92c6c5122f60e6dbc221ac0d65b0f03;p=karo-tx-linux.git mm: remap_file_pages: initialize populate before usage 'populate' wasn't initialized before being used in error paths, causing panics when mm_populate() would get called with invalid values. Signed-off-by: Sasha Levin Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton --- diff --git a/mm/mmap.c b/mm/mmap.c index 84dcfc72afd5..2a0e0a8337b6 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2591,7 +2591,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, struct mm_struct *mm = current->mm; struct vm_area_struct *vma; - unsigned long populate; + unsigned long populate = 0; unsigned long ret = -EINVAL; pr_warn_once("%s (%d) uses deprecated remap_file_pages() syscall. "