]> 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>
Wed, 26 Sep 2012 01:33:40 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 05:44:59 +0000 (15:44 +1000)
commitd7a5308f348d6ddd899cbe26150b7cb066e6e25b
tree7cf6dc2e2210278a2f23af90496170f00d30e504
parent108fc102b2efcdffb77aadb2b0741c94a63dc4f8
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