linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] mm: Fix misuse of parent anon_vma in dup_mmap path
@ 2020-02-08  8:35 Li Xinhai
  2020-02-08  8:35 ` [PATCH 1/3] mm: don't prepare anon_vma if vma has VM_WIPEONFORK Li Xinhai
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Li Xinhai @ 2020-02-08  8:35 UTC (permalink / raw)
  To: linux-mm; +Cc: akpm

This patchset fix the misuse of parenet anon_vma, which mainly caused by
child vma's vm_next and vm_prev are left same as its parent after
duplicate vma. Finally, code reached parent vma's neighbor by referring
pointer of child vma and executed wrong logic.

The first two patches fix relevant issues, and the third patch sets vm_next
and vm_prev to NULL when duplicate vma to prevent potential misuse in future. 

Li Xinhai (3):
  mm: don't prepare anon_vma if vma has VM_WIPEONFORK
  Revert "mm/rmap.c: reuse mergeable anon_vma as parent when fork"
  mm: set vm_next and vm_prev to NULL in vm_area_dup()

 kernel/fork.c | 10 ++++++----
 mm/rmap.c     | 13 -------------
 2 files changed, 6 insertions(+), 17 deletions(-)

-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-04-21  7:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08  8:35 [PATCH 0/3] mm: Fix misuse of parent anon_vma in dup_mmap path Li Xinhai
2020-02-08  8:35 ` [PATCH 1/3] mm: don't prepare anon_vma if vma has VM_WIPEONFORK Li Xinhai
2020-02-08  8:53   ` Li Xinhai
2020-04-02 13:45   ` Kirill A. Shutemov
2020-02-08  8:35 ` [PATCH 2/3] Revert "mm/rmap.c: reuse mergeable anon_vma as parent when fork" Li Xinhai
2020-04-02 13:59   ` Kirill A. Shutemov
2020-04-03  3:08     ` Li Xinhai
2020-04-05  1:26       ` Li Xinhai
2020-02-08  8:35 ` [PATCH 3/3] mm: set vm_next and vm_prev to NULL in vm_area_dup() Li Xinhai
2020-04-02 14:07   ` Kirill A. Shutemov
2020-02-10  0:52 ` [PATCH 0/3] mm: Fix misuse of parent anon_vma in dup_mmap path Andrew Morton
2020-02-10  2:15   ` Li Xinhai
2020-04-20 12:06     ` Michal Hocko
2020-04-21  3:53       ` Li Xinhai
2020-04-21  7:26         ` Michal Hocko
2020-04-02  1:25 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).