diff options
| author | Liam R. Howlett <[email protected]> | 2023-09-29 18:30:40 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-10-06 21:11:38 +0000 |
| commit | 824135c46b00df7fb369ec7f1f8607427bbebeb0 (patch) | |
| tree | aea237d178a45ce93cae06005e8364232050aef4 /drivers/net/xen-netback/interface.c | |
| parent | mmap: fix vma_iterator in error path of vma_merge() (diff) | |
| download | kernel-824135c46b00df7fb369ec7f1f8607427bbebeb0.tar.gz kernel-824135c46b00df7fb369ec7f1f8607427bbebeb0.zip | |
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/[email protected]
Fixes: d4af56c5c7c6 ("mm: start tracking VMAs with maple tree")
Signed-off-by: Liam R. Howlett <[email protected]>
Reviewed-by: Lorenzo Stoakes <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
