diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-07 19:52:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-07 19:52:29 -0400 |
commit | 04b1a22350e1e6464c3109886385178d119dbbb4 (patch) | |
tree | bea1d2d0f8692c82ccf9b9c727436fe9ddaa1531 | |
parent | a55cb185b4a8f84cd05b66bb00b267ea455ecdc8 (diff) | |
parent | 179b284e2fc0c638035843968f7d7ab8ab701525 (diff) |
Merge branch 'vhost' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
-rw-r--r-- | drivers/vhost/vhost.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 7bd7a1e4409d..b8e112720812 100644 --- 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, | |||
235 | int log_all) | 235 | int log_all) |
236 | { | 236 | { |
237 | int i; | 237 | int i; |
238 | |||
239 | if (!mem) | ||
240 | return 0; | ||
241 | |||
238 | for (i = 0; i < mem->nregions; ++i) { | 242 | for (i = 0; i < mem->nregions; ++i) { |
239 | struct vhost_memory_region *m = mem->regions + i; | 243 | struct vhost_memory_region *m = mem->regions + i; |
240 | unsigned long a = m->userspace_addr; | 244 | unsigned long a = m->userspace_addr; |