From: Liam R. Howlett Date: Thu, 4 Feb 2021 18:59:30 +0000 (-0500) Subject: mm/mmap: Set next to NULL in mmap_region() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=846988a01bc6341b137688e1374d0f622df9e9ef;p=users%2Fjedix%2Flinux-maple.git mm/mmap: Set next to NULL in mmap_region() When following cannot_expand goto, next would not be set Signed-off-by: Liam R. Howlett --- diff --git a/mm/mmap.c b/mm/mmap.c index 43ebbc70fc67..b31564f15103 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2528,7 +2528,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr, { struct mm_struct *mm = current->mm; struct vm_area_struct *vma = NULL; - struct vm_area_struct *prev, *next; + struct vm_area_struct *prev, *next = NULL; pgoff_t pglen = len >> PAGE_SHIFT; unsigned long charged = 0; unsigned long end = addr + len;