]> git.baikalelectronics.ru Git - kernel.git/commit
vma_adjust: fix the copying of anon_vma chains
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 10 Apr 2010 22:22:30 +0000 (15:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Apr 2010 00:54:11 +0000 (17:54 -0700)
commit48d75a3dc9d27771db6eaa3ea7d38f5062a3d974
treec060c9b3e9fd61507687a419a94c659425de57e4
parent2575e94201e7eb2b3f00b4aca6e741f3708329df
vma_adjust: fix the copying of anon_vma chains

When we move the boundaries between two vma's due to things like
mprotect, we need to make sure that the anon_vma of the pages that got
moved from one vma to another gets properly copied around.  And that was
not always the case, in this rather hard-to-follow code sequence.

Clarify the code, and fix it so that it copies the anon_vma from the
right source.

Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Tested-by: Borislav Petkov <bp@alien8.de> [ "Yeah, not so much this one either" ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c