aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/uaccess.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h
index 6d8cab22e294..5dd511b62ce9 100644
--- a/include/asm-generic/uaccess.h
+++ b/include/asm-generic/uaccess.h
@@ -291,6 +291,8 @@ strncpy_from_user(char *dst, const char __user *src, long count)
291#ifndef strnlen_user 291#ifndef strnlen_user
292static inline long strnlen_user(const char __user *src, long n) 292static inline long strnlen_user(const char __user *src, long n)
293{ 293{
294 if (!access_ok(VERIFY_READ, src, 1))
295 return 0;
294 return strlen((void * __force)src) + 1; 296 return strlen((void * __force)src) + 1;
295} 297}
296#endif 298#endif