summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@oracle.com>2023-09-29 21:30:40 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-10-07 00:11:38 +0300
commit824135c46b00df7fb369ec7f1f8607427bbebeb0 (patch)
treeaea237d178a45ce93cae06005e8364232050aef4 /arch/riscv
parent1419430c8abb5a00590169068590dd54d86590ba (diff)
downloadlinux-824135c46b00df7fb369ec7f1f8607427bbebeb0.tar.xz
mmap: fix error paths with dup_anon_vma()
When the calling function fails after the dup_anon_vma(), the duplication of the anon_vma is not being undone. Add the necessary unlink_anon_vma() call to the error paths that are missing them. This issue showed up during inspection of the error path in vma_merge() for an unrelated vma iterator issue. Users may experience increased memory usage, which may be problematic as the failure would likely be caused by a low memory situation. Link: https://lkml.kernel.org/r/20230929183041.2835469-3-Liam.Howlett@oracle.com Fixes: d4af56c5c7c6 ("mm: start tracking VMAs with maple tree") Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jann Horn <jannh@google.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/riscv')
0 files changed, 0 insertions, 0 deletions