projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branches 'pm-cpuidle', 'pm-opp' and 'pm-avs'
[cascardo/linux.git]
/
arch
/
hexagon
/
include
/
asm
/
uaccess.h
diff --git
a/arch/hexagon/include/asm/uaccess.h
b/arch/hexagon/include/asm/uaccess.h
index
f000a38
..
f61cfb2
100644
(file)
--- a/
arch/hexagon/include/asm/uaccess.h
+++ b/
arch/hexagon/include/asm/uaccess.h
@@
-103,7
+103,8
@@
static inline long hexagon_strncpy_from_user(char *dst, const char __user *src,
{
long res = __strnlen_user(src, n);
- /* return from strnlen can't be zero -- that would be rubbish. */
+ if (unlikely(!res))
+ return -EFAULT;
if (res > n) {
copy_from_user(dst, src, n);