summaryrefslogtreecommitdiffstats
path: root/arch/openrisc/include
diff options
context:
space:
mode:
authorJonas Bonn <jonas@southpole.se>2012-05-25 08:24:49 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-25 08:17:43 -0700
commit603d6637aeb9a14cd0087d7c24c3777bfa51fcbf (patch)
tree8b86e31d3d0a9d88b12629c27d2607d6e1420ac8 /arch/openrisc/include
parentece78b7df734726e790dcab207f463401ff80440 (diff)
downloadblackbird-op-linux-603d6637aeb9a14cd0087d7c24c3777bfa51fcbf.tar.gz
blackbird-op-linux-603d6637aeb9a14cd0087d7c24c3777bfa51fcbf.zip
openrisc: use generic strncpy_from_user
As per commits 2922585b9329 ("lib: Sparc's strncpy_from_user is generic enough, move under lib/") and 92ae03f2ef99 ("x86: merge 32/64-bit versions of 'strncpy_from_user()' and speed it up"), and corresponding discussion on linux-arch. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/openrisc/include')
-rw-r--r--arch/openrisc/include/asm/uaccess.h10
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)
OpenPOWER on IntegriCloud