summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller2010-10-21 10:08:39 +0200
committerDavid S. Miller2010-10-21 10:08:39 +0200
commitd836b31e164e15a5f366199f4ee757c6be7dc91e (patch)
tree3470c3050c54284f25228aeceff4d9406dde525a
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padova... (diff)
parentvhost: fix return code for log_access_ok() (diff)
downloadkernel-qcow2-linux-d836b31e164e15a5f366199f4ee757c6be7dc91e.tar.gz
kernel-qcow2-linux-d836b31e164e15a5f366199f4ee757c6be7dc91e.tar.xz
kernel-qcow2-linux-d836b31e164e15a5f366199f4ee757c6be7dc91e.zip
Merge branch 'vhost-net' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
-rw-r--r--drivers/vhost/vhost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index dd3d6f7406f8..158004e46e56 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -371,7 +371,7 @@ static int log_access_ok(void __user *log_base, u64 addr, unsigned long sz)
/* Make sure 64 bit math will not overflow. */
if (a > ULONG_MAX - (unsigned long)log_base ||
a + (unsigned long)log_base > ULONG_MAX)
- return -EFAULT;
+ return 0;
return access_ok(VERIFY_WRITE, log_base + a,
(sz + VHOST_PAGE_SIZE * 8 - 1) / VHOST_PAGE_SIZE / 8);