Commit 3179ce72 authored by Richard Weinberger's avatar Richard Weinberger

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: default avatarRichard Weinberger <richard@nod.at>
parent ecb2cf1a
...@@ -254,6 +254,6 @@ int strnlen_user(const void __user *str, int len) ...@@ -254,6 +254,6 @@ int strnlen_user(const void __user *str, int len)
n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count); n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count);
if (n == 0) if (n == 0)
return count + 1; return count + 1;
return -EFAULT; return 0;
} }
EXPORT_SYMBOL(strnlen_user); EXPORT_SYMBOL(strnlen_user);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment