aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2013-05-11 09:35:32 -0400
committerRichard Weinberger <richard@nod.at>2013-07-19 04:45:17 -0400
commit3179ce7254ffa43f3ba4409f31a954ecc4a8d408 (patch)
tree0af7d0b24486289bc0333f5812eac1b7cddea9e6 /arch
parentecb2cf1a6b63825a258ff4fe0d7f3070fbe4676b (diff)
um: Fix return value of strnlen_user()
In case of an error it must not return -EFAULT. Return 0 like all other archs do. Reported-by: toralf.foerster@gmx.de Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch')
-rw-r--r--arch/um/kernel/skas/uaccess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c
index 1d3e0c17340b..4ffb644d6c07 100644
--- a/arch/um/kernel/skas/uaccess.c
+++ b/arch/um/kernel/skas/uaccess.c
@@ -254,6 +254,6 @@ int strnlen_user(const void __user *str, int len)
254 n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count); 254 n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count);
255 if (n == 0) 255 if (n == 0)
256 return count + 1; 256 return count + 1;
257 return -EFAULT; 257 return 0;
258} 258}
259EXPORT_SYMBOL(strnlen_user); 259EXPORT_SYMBOL(strnlen_user);