From f5759f3baaae8f5ef3e5004744b87200e5732d5b Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sat, 17 May 2014 23:19:30 +1000 Subject: [PATCH] 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 --- mm/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. " -- 2.39.5