]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm anon rmap: in mremap, set the new vma's position before anon_vma_clone()
authorMichel Lespinasse <walken@google.com>
Fri, 28 Sep 2012 00:19:35 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 3 Oct 2012 06:49:26 +0000 (16:49 +1000)
commit5f8d36511a9da9d037dd6faa5b5bfa9ac2fff3e3
treeb4cf08942d03b1fdfdf646e454cbeade25bfd8de
parent26a1dadb910758567f696228d29e370b83940a8a
mm anon rmap: in mremap, set the new vma's position before anon_vma_clone()

anon_vma_clone() expects new_vma->vm_{start,end,pgoff} to be correctly set
so that the new vma can be indexed on the anon interval tree.

copy_vma() was failing to do that, which broke mremap().

Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Hugh Dickins <hughd@google.com>
Tested-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c