]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mmap: Fix mmap_region() maple state
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Mar 2021 19:23:26 +0000 (14:23 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 1 Mar 2021 19:23:26 +0000 (14:23 -0500)
When finding next, tmp must be reset to mas to ensure the correct slot is
used for writing

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

index 0767553aa7bcfe614b5f66d58f50f04476c5614d..73fc95a10c8d3cb91ab1490dd635a617f58ec631 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2561,6 +2561,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
                        merge_end = next->vm_end;
                        vma = next;
                        vm_pgoff = next->vm_pgoff - pglen;
+                       tmp = mas;
                }
        }