asm-generic: uaccess: add missing access_ok() check to strnlen_user()
authorMike Frysinger <vapier@gentoo.org>
Sun, 14 Jun 2009 06:00:02 +0000 (02:00 -0400)
committerArnd Bergmann <arnd@arndb.de>
Fri, 19 Jun 2009 12:58:07 +0000 (14:58 +0200)
The strnlen_user() function was missing a access_ok() check on the pointer
given.  We've had cases on Blackfin systems where test programs caused
kernel crashes here because userspace passed up a NULL/-1 pointer and the
kernel gladly attempted to run strlen() on it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

No differences found