]> git.baikalelectronics.ru Git - kernel.git/commit
anon_vma: clone the anon_vma chain in the right order
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 12 Apr 2010 00:15:03 +0000 (17:15 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Apr 2010 00:54:12 +0000 (17:54 -0700)
commit8c9c9fc01adeecbaa1912992641461d450598ccc
treed457ef34537cf91ddc91dafc4842de9f43ed9555
parent48d75a3dc9d27771db6eaa3ea7d38f5062a3d974
anon_vma: clone the anon_vma chain in the right order

We want to walk the chain in reverse order when cloning it, so that the
order of the result chain will be the same as the order in the source
chain.  When we add entries to the chain, they go at the head of the
chain, so we want to add the source head last.

Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Borislav Petkov <bp@alien8.de> [ "No, it still oopses" ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/rmap.c