summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2014-07-31 09:38:10 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-08-06 16:44:54 +1000
commit1240e6c624efe094afee030325e0d9614b3960b4 (patch)
tree4490b7914423999a379ef760770cc3b459cf0107
parent3b0b60e41a1baa4416e8671b70fc0c4714cb1141 (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>
-rw-r--r--mm/mmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index d277a2aaeec7..bd72ae423838 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2614,7 +2614,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. "