mm/nommu.c: add additional check for vread() just like vwrite() has done
authorChen Gang <gang.chen@asianux.com>
Wed, 3 Jul 2013 22:02:36 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:31 +0000 (16:07 -0700)
commit9bde916bc73255dcee3d8aded990443675daa707
tree5f8487f28ba847ff7b7ddf1df6493ba20d555ebd
parentdacbde0963d62a4962d5e8a5cc38dfd1f016124b
mm/nommu.c: add additional check for vread() just like vwrite() has done

vwrite() checks for overflow. vread() should do the same thing.

Since vwrite() checks the source buffer address, vread() should check
the destination buffer address.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Michel Lespinasse <walken@google.com>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/nommu.c