vhost-net: fix vq_memory_access_ok error checking
Subsystems (4)
Michael S. Tsirkin
maintainerQuoted 4 lines · Jeff Dike
vq_memory_access_okneeds to check whether mem == NULLSigned-off-by Jeff Dike <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>
This was already queued by me, you do not need to
fill Dave's inbox with vhost patches.
Quoted 21 lines
--- drivers/vhost/vhost.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/vhost/vhost.c +4
-0@@ -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;Signature · 1 line
1.7.0.2.280.gc6f05
Michael S. Tsirkin
maintainerQuoted 8 lines · Michael S. Tsirkin
Quoted 4 lines · Jeff Dike
vq_memory_access_okneeds to check whether mem == NULLSigned-off-by Jeff Dike <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>This was already queued by me, you do not need to
fill Dave's inbox with vhost patches.
This was sent in error, please ignore.
Sorry about the noise.
Quoted 21 lines
Quoted 21 lines
--- drivers/vhost/vhost.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/vhost/vhost.c +4
-0@@ -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;Signature · 1 line
1.7.0.2.280.gc6f05