sh: Fixup __strnlen_user() behaviour.
authorPaul Mundt <lethal@linux-sh.org>
Wed, 27 Sep 2006 08:07:07 +0000 (17:07 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 27 Sep 2006 08:07:07 +0000 (17:07 +0900)
commit2991be725260d6fec11691a6138b9d71de949956
tree407241b126eed902bacba4e02043930c6ce087b4
parent0f08f338083cc1d68788ccbccc44bd0502fc57ae
sh: Fixup __strnlen_user() behaviour.

Drop TIF_USERSPACE and add addr_limit to the thread_info struct.
Subsequently, use that for address checking in strnlen_user() to
ward off bogus -EFAULTs.

Make __strnlen_user() return 0 on exception, rather than -EFAULT.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/process.c
include/asm-sh/processor.h
include/asm-sh/thread_info.h
include/asm-sh/uaccess.h