diff options
Diffstat (limited to 'drivers/vhost/vhost.c')
-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 344019774ddd..b6f149572d1a 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -418,7 +418,7 @@ static int log_access_ok(void __user *log_base, u64 addr, unsigned long sz) | |||
418 | /* Make sure 64 bit math will not overflow. */ | 418 | /* Make sure 64 bit math will not overflow. */ |
419 | if (a > ULONG_MAX - (unsigned long)log_base || | 419 | if (a > ULONG_MAX - (unsigned long)log_base || |
420 | a + (unsigned long)log_base > ULONG_MAX) | 420 | a + (unsigned long)log_base > ULONG_MAX) |
421 | return -EFAULT; | 421 | return 0; |
422 | 422 | ||
423 | return access_ok(VERIFY_WRITE, log_base + a, | 423 | return access_ok(VERIFY_WRITE, log_base + a, |
424 | (sz + VHOST_PAGE_SIZE * 8 - 1) / VHOST_PAGE_SIZE / 8); | 424 | (sz + VHOST_PAGE_SIZE * 8 - 1) / VHOST_PAGE_SIZE / 8); |