]> git.baikalelectronics.ru Git - kernel.git/commit
rmap: fix anon_vma_fork() memory leak
authorRik van Riel <riel@redhat.com>
Mon, 5 Apr 2010 16:13:33 +0000 (12:13 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 5 Apr 2010 16:15:51 +0000 (09:15 -0700)
commit32d3b676946e9d06ff27a1c5eaefc9366ca1be4e
treea27a670f2cbe7d689588af24c6c9cda82690c7c2
parentc51a69113b4e24f2ce4a09d422872f60388d21e3
rmap: fix anon_vma_fork() memory leak

Fix a memory leak in anon_vma_fork(), where we fail to tear down the
anon_vmas attached to the new VMA in case setting up the new anon_vma
fails.

This bug also has the potential to leave behind anon_vma_chain structs
with pointers to invalid memory.

Reported-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/rmap.c