summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2014-07-23 09:13:13 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-07-28 20:51:17 +1000
commit6bfb530096102198b8586af0b3eb6ce5364e3794 (patch)
tree2e94e3d94349959bf033f442514f8b3160a718b6 /mm
parent938f95e07aa861a0c05a12b9c35865fc1c6423ff (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. "