diff options
author | David S. Miller <davem@davemloft.net> | 2010-10-21 10:08:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-21 10:08:39 +0200 |
commit | d836b31e164e15a5f366199f4ee757c6be7dc91e (patch) | |
tree | 3470c3050c54284f25228aeceff4d9406dde525a /drivers | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padova... (diff) | |
parent | vhost: fix return code for log_access_ok() (diff) | |
download | linux-d836b31e164e15a5f366199f4ee757c6be7dc91e.tar.xz linux-d836b31e164e15a5f366199f4ee757c6be7dc91e.zip |
Merge branch 'vhost-net' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/vhost/vhost.c | 2 |
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); |