From: Takuya Yoshikawa Date: Thu, 27 May 2010 09:58:03 +0000 (+0900) Subject: vhost: fix to check the return value of copy_to/from_user() correctly X-Git-Tag: v2.6.35-rc1~24^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ad9c9d27048547e96e4e3a13b5780ec6f81bb9f;p=pandora-kernel.git vhost: fix to check the return value of copy_to/from_user() correctly copy_to/from_user() returns the number of bytes that could not be copied. So we need to check if it is not zero, and in that case, we should return the error number -EFAULT rather than directly return the return value from copy_to/from_user(). Signed-off-by: Takuya Yoshikawa Signed-off-by: Michael S. Tsirkin --- Reading git-diff-tree failed