]> 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>
Thu, 27 Sep 2012 07:26:29 +0000 (17:26 +1000)
commit23f52165f7066f2bbaddc85b45d5ae156e651b27
treee625c7178d80f2c5de9339da2966520781937626
parent72e020df22fb07a7661c3e6fca9326a8fba4ae97
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