summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2014-07-17 10:59:14 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-07-21 18:27:32 +1000
commitd127e480a58123cfd8adeb5804a51e938d16ed83 (patch)
tree297460e40d804a4b7df8e17dcf3f0063761da708 /mm
parent6bf376020d5386c3c79e2568366403876dcb8a76 (diff)
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 <sasha.levin@oracle.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index a7444253c323..650b330bbe37 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2596,7 +2596,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. "