]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mmap: Set next to NULL in mmap_region()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 4 Feb 2021 18:59:30 +0000 (13:59 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 4 Feb 2021 18:59:30 +0000 (13:59 -0500)
When following cannot_expand goto, next would not be set

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/mmap.c

index 43ebbc70fc6788fccebe82c6de5ebf2b3785c141..b31564f151038feaac7e53ce4626ee9c55809d2c 100644 (file)
--- 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;