diff options
Diffstat (limited to 'arch/openrisc/include/asm/uaccess.h')
-rw-r--r-- | arch/openrisc/include/asm/uaccess.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/openrisc/include/asm/uaccess.h b/arch/openrisc/include/asm/uaccess.h index f5abaa0ffc38..04b93de92636 100644 --- a/arch/openrisc/include/asm/uaccess.h +++ b/arch/openrisc/include/asm/uaccess.h @@ -313,14 +313,10 @@ clear_user(void *addr, unsigned long size) return size; } -extern int __strncpy_from_user(char *dst, const char *src, long count); +#define user_addr_max() \ + (segment_eq(get_fs(), USER_DS) ? TASK_SIZE : ~0UL) -static inline long strncpy_from_user(char *dst, const char *src, long count) -{ - if (access_ok(VERIFY_READ, src, 1)) - return __strncpy_from_user(dst, src, count); - return -EFAULT; -} +extern long strncpy_from_user(char *dest, const char __user *src, long count); /* * Return the size of a string (including the ending 0) |