From: Liam R. Howlett Date: Fri, 28 Feb 2020 17:09:32 +0000 (-0500) Subject: mmap: Write changes to next to the maple tree. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1b1cc14d7841ecff87ce2a78e6ec6b65a4044eb6;p=users%2Fjedix%2Flinux-maple.git mmap: Write changes to next to the maple tree. 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 --- diff --git a/mm/mmap.c b/mm/mmap.c index 0a741e5bd55e..0fe9c8ae6a64 100644 --- 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) {