]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mmap: Write changes to next to the maple tree.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 28 Feb 2020 17:09:32 +0000 (12:09 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:01:59 +0000 (15:01 -0400)
When mprotect case 4 is hit (expand next back over vma), you have to
write the changes to the maple tree or there will be a missing mapping.

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

index a31cdbc2f7dac9a84ff574c3696d47d6dea25d28..8bf8ee55ae295c3aaef4f05e11e1e9679fe5d5e9 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1060,8 +1060,7 @@ again:
        if (adjust_next) {
                next->vm_start += adjust_next;
                next->vm_pgoff += adjust_next >> PAGE_SHIFT;
-               // maple tree erase/store is unnecessary as the adjusting of
-               // the vma would have overwritten the area.
+               __vma_mt_store(mm, next);
        }
 
        if (file) {