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-07 17:03:49 +1000
commit0f72a1f5cff93dd4080c3b77fcc8503db644af05 (patch)
treedf45b2700d130dd403a40b7596baff16ad695c45
parentdb0ba115e76763b8bf355ae71ef0a187b2fdaf79 (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. "