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>
This commit is contained in:
Paul Mundt
2006-09-27 17:07:07 +09:00
parent 0f08f33808
commit 2991be7252
4 changed files with 22 additions and 54 deletions

View File

@@ -149,6 +149,10 @@ struct thread_struct {
union sh_fpu_union fpu;
};
typedef struct {
unsigned long seg;
} mm_segment_t;
/* Count of active tasks with UBC settings */
extern int ubc_usercnt;