]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: WARN_ON_ONCE if f_op->mmap() change vma's start address
authorJoonsoo Kim <js1304@gmail.com>
Thu, 29 Nov 2012 03:18:07 +0000 (14:18 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:20 +0000 (16:23 +1100)
commit373d54c59bc800895f601f32eb9496039117b04b
treee3fd62150d8ee85576bc0b6ad30aa91a417433d5
parentb8883bbbb1baa1137e985787d798478b4aab91a2
mm: WARN_ON_ONCE if f_op->mmap() change vma's start address

During reviewing the source code, I found a comment which mention that
after f_op->mmap(), vma's start address can be changed.  I didn't verify
that it is really possible, because there are so many f_op->mmap()
implementation.  But if there are some mmap() which change vma's start
address, it is possible error situation, because we already prepare prev
vma, rb_link and rb_parent and these are related to original address.

So add WARN_ON_ONCE for finding that this situtation really happens.

Signed-off-by: Joonsoo Kim <js1304@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c