diff options
author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2010-05-27 11:58:03 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-05-27 12:54:59 +0200 |
commit | 7ad9c9d27048547e96e4e3a13b5780ec6f81bb9f (patch) | |
tree | 0f70562d0f51c086b02953388578bd87040b5067 /mm | |
parent | vhost: Fix host panic if ioctl called with wrong index (diff) | |
download | linux-7ad9c9d27048547e96e4e3a13b5780ec6f81bb9f.tar.xz linux-7ad9c9d27048547e96e4e3a13b5780ec6f81bb9f.zip |
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 <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions