From 3179ce7254ffa43f3ba4409f31a954ecc4a8d408 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Sat, 11 May 2013 15:35:32 +0200 Subject: 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 diff --git a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c index 1d3e0c1..4ffb644 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) n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count); if (n == 0) return count + 1; - return -EFAULT; + return 0; } EXPORT_SYMBOL(strnlen_user); -- cgit v0.10.2