Skip to content

Commit

Permalink
um: Fix return value of strnlen_user()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Weinberger committed Jul 19, 2013
1 parent ecb2cf1 commit 3179ce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/um/kernel/skas/uaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 3179ce7

Please sign in to comment.