]> git.baikalelectronics.ru Git - kernel.git/commit
mm: mremap: validate input before taking lock
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Mon, 8 Jul 2013 22:59:48 +0000 (15:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jul 2013 17:33:20 +0000 (10:33 -0700)
commit7f0701630da25d74d7e637cb686b13fc751c6d26
tree6212adc65070486edc212587c8f3a16452d810ec
parent1710f53da9b7289f2065d585233a4e50b6573cb3
mm: mremap: validate input before taking lock

This patch is very similar to commit 356604d8ba76 ("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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mremap.c