OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
535297a
)
vhost-net: fix vq_memory_access_ok error checking
author
Jeff Dike
<jdike@addtoit.com>
Wed, 7 Apr 2010 13:59:10 +0000
(09:59 -0400)
committer
Michael S. Tsirkin
<mst@redhat.com>
Wed, 7 Apr 2010 14:04:45 +0000
(17:04 +0300)
vq_memory_access_ok needs to check whether mem == NULL
Signed-off-by: Jeff Dike <jdike@linux.intel.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
7bd7a1e
..
b8e1127
100644
(file)
--- a/
drivers/vhost/vhost.c
+++ b/
drivers/vhost/vhost.c
@@
-235,6
+235,10
@@
static int vq_memory_access_ok(void __user *log_base, struct vhost_memory *mem,
int log_all)
{
int i;
+
+ if (!mem)
+ return 0;
+
for (i = 0; i < mem->nregions; ++i) {
struct vhost_memory_region *m = mem->regions + i;
unsigned long a = m->userspace_addr;