]> git.karo-electronics.de Git - linux-beck.git/commit
mm: madvise: complete input validation before taking lock
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Mon, 29 Apr 2013 22:08:23 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 29 Apr 2013 22:54:37 +0000 (15:54 -0700)
commit84d96d897671cfb386e722acbefdb3a79e115a8a
tree0d7559bf9434ccfd933cfd385ff2c3843e6fd396
parent4edd7ceff0662afde195da6f6c43e7cbe1ed2dc4
mm: madvise: complete input validation before taking lock

In madvise(), there doesn't seem to be any reason for taking the
&current->mm->mmap_sem before start and len_in have been validated.
Incidentally, this removes the need for the out: label.

[akpm@linux-foundation.org: s/out_plug/out/, per David]
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/madvise.c