unlink_anon_vmas in __split_vma in case of error
Subsystems (2)
PATCH 1/1 unlink_anon_vmas in __split_vma in case of error
From: Andrea Arcangeli <[email protected]>
If __split_vma fails because of an out of memory condition the anon_vma_chain isn't teardown and freed potentially leading to rmap walks accessing freed vma information plus there's a memleak.
---
mm/mmap.c +1 -0
@@ -2014,6 +2014,7 @@ static int __split_vma(struct mm_structremoved_exe_file_vma (mm);fput (new->vm_file); } +unlink_anon_vmas (new); out_free_mpol:mpol_put (pol); out_free_vma:
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Andrea Arcangeli
From: Andrea Arcangeli <[email protected]>
If
__split_vmafails because of an out of memory condition theanon_vma_chainisn't teardown and freed potentially leading to rmap walks accessing freed vma information plus there's a memleak.Signed-off-by Andrea Arcangeli <[email protected]>
and I'm glad to see Andrew already added Cc: [email protected]
mm/mmap.c static int __split_vma(struct mm_struct · line 2020
Quoted 13 lines
---
mm/mmap.c +1
-0@@ -2014,6 +2014,7 @@ static int __split_vma(struct mm_structremoved_exe_file_vma (mm);fput (new->vm_file); } +unlink_anon_vmas (new); out_free_mpol:mpol_put (pol); out_free_vma:
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Andrea Arcangeli
From: Andrea Arcangeli <[email protected]>
If
__split_vmafails because of an out of memory condition theanon_vma_chainisn't teardown and freed potentially leading to rmap walks accessing freed vma information plus there's a memleak.Signed-off-by Andrea Arcangeli <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 7 lines · Andrea Arcangeli
From: Andrea Arcangeli<[email protected]>
If
__split_vmafails because of an out of memory condition theanon_vma_chainisn't teardown and freed potentially leading to rmap walks accessing freed vma information plus there's a memleak.Signed-off-by Andrea Arcangeli<[email protected]>
Signature · 7 lines
All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>