]> git.karo-electronics.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>
Thu, 4 Oct 2012 05:03:24 +0000 (15:03 +1000)
commitf11e9743a51ae4f8ff1c6883a30cac3b28c88bf3
treedf0413ed41937a7dc84aa11a2bb5dffcb2da633a
parent8d58b5ca643c1eaf259966b981ceb295a96e2943
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