]> 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>
Tue, 5 Jan 2021 17:28:23 +0000 (12:28 -0500)
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 0a741e5bd55e5ba7103c73defbcf755fa0af4331..0fe9c8ae6a64c2f1934c604c54cd392607cf058b 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) {