projects
/
kernel
/
kernel-generic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0057c5
)
vhost: fix return code for log_access_ok()
author
Dan Carpenter
<error27@gmail.com>
Mon, 11 Oct 2010 17:24:19 +0000
(19:24 +0200)
committer
Michael S. Tsirkin
<mst@redhat.com>
Tue, 12 Oct 2010 12:32:28 +0000
(14:32 +0200)
access_ok() returns 1 if it's OK otherwise it should return 0.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vhost.c
patch
|
blob
|
history
diff --git
a/drivers/vhost/vhost.c
b/drivers/vhost/vhost.c
index
dd3d6f7
..
158004e
100644
(file)
--- 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);