MIPS: Fix strnlen_user access check
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 15 Apr 2021 21:21:11 +0000 (23:21 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 15 Apr 2021 21:42:21 +0000 (23:42 +0200)
commit2c92ef8ff8d327797c1920ae7f938bcc6f3f7421
tree0f72d5bb46397d2b3615194beb4e597d673e6839
parent168b84d5d2c07ae6c96ea40a7f420b5b525defa0
MIPS: Fix strnlen_user access check

Commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs") changed the access_ok
for strnlen_user to check the whole range, which broke some callers
of strndup_user(). Restore the old behaviour and just check the first byte.

Fixes: 04324f44cb69 ("MIPS: Remove get_fs/set_fs")
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/uaccess.h