Commit 04b1a223 authored by David S. Miller's avatar David S. Miller
parents a55cb185 179b284e
...@@ -235,6 +235,10 @@ static int vq_memory_access_ok(void __user *log_base, struct vhost_memory *mem, ...@@ -235,6 +235,10 @@ static int vq_memory_access_ok(void __user *log_base, struct vhost_memory *mem,
int log_all) int log_all)
{ {
int i; int i;
if (!mem)
return 0;
for (i = 0; i < mem->nregions; ++i) { for (i = 0; i < mem->nregions; ++i) {
struct vhost_memory_region *m = mem->regions + i; struct vhost_memory_region *m = mem->regions + i;
unsigned long a = m->userspace_addr; unsigned long a = m->userspace_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment