]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Fix strnlen_user() return value in case of overlong strings.
authorRalf Baechle <ralf@linux-mips.org>
Tue, 4 Nov 2014 10:54:29 +0000 (11:54 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 4 Nov 2014 11:46:33 +0000 (12:46 +0100)
commit7199599aedfae900feeb64cbde256786b886617c
treeb0a8e44f720c2966e5c545f0cff5a638593cfb95
parent5cd2a49d9d10ac6dac339fc10f5048f6c765ec6f
MIPS: Fix strnlen_user() return value in case of overlong strings.

We were returning maxlen like the userland strnlen if no '\0' character
was encountered while the kernel version is expected to return a value
larger than maxlen.  Fixed to return maxlen + 1.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/lib/strnlen_user.S