]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: mremap: validate input before taking lock
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Thu, 27 Jun 2013 23:52:24 +0000 (09:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:04 +0000 (16:38 +1000)
commitc94751025737d3a0096fe4a78a02b17581dfdde6
tree269aa1d2545dbbb0782066f9762c2331bf5e46e5
parent2de0e2b305489119d6dc58d3ecb15433a3c95979
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