]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: mremap: validate input before taking lock
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 19 Jun 2013 00:06:54 +0000 (10:06 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:50 +0000 (17:26 +1000)
commit9e99b67df1c115471f0e5409f978a95245b4ad38
tree75ba1a28d4d113e3db20f4eb8000fda1ad360c7e
parente304af3a972368b26b4e51de56cc0d23e7bd453d
mm: mremap: validate input before taking lock

This patch is very similar to 84d96d897671 ("mm: madvise: complete input
validation before taking lock"): perform some basic validation of the
input to mremap() before taking the &current->mm->mmap_sem lock.  This
also makes the MREMAP_FIXED => MREMAP_MAYMOVE dependency slightly more
explicit.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mremap.c