diff options
author | Vlastimil Babka <vbabka@suse.cz> | 2023-02-28 04:00:14 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-28 04:00:14 +0300 |
commit | 4c6759967826b87f56c73e0f1deb7b76379ccd23 (patch) | |
tree | ee59d43c1fcc8d1a95a7788825024d39b6b28daa /mm/damon | |
parent | 1ec35eadc3b448c91a6b763371a7073444e95f9d (diff) | |
download | linux-4c6759967826b87f56c73e0f1deb7b76379ccd23.tar.xz |
mm/mremap: fix dup_anon_vma() in vma_merge() case 4
In case 4, we are shrinking 'prev' (PPPP in the comment) and expanding
'mid' (NNNN). So we need to make sure 'mid' clones the anon_vma from
'prev', if it doesn't have any. After commit 0503ea8f5ba7 ("mm/mmap:
remove __vma_adjust()") we can fail to do that due to wrong parameters for
dup_anon_vma(). The call is a no-op because res == next, adjust == mid
and mid == next. Fix it.
Link: https://lkml.kernel.org/r/ad91d62b-37eb-4b73-707a-3c45c9e16256@suse.cz
Fixes: 0503ea8f5ba7 ("mm/mmap: remove __vma_adjust()")
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon')
0 files changed, 0 insertions, 0 deletions