git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a90ca1a
)
vhost: check memory map before address translation
author
Pavel Fedin
<p.fedin@samsung.com>
Wed, 13 Jan 2016 07:32:57 +0000
(10:32 +0300)
committer
Thomas Monjalon
<thomas.monjalon@6wind.com>
Sun, 21 Feb 2016 10:17:48 +0000
(11:17 +0100)
Malfunctioning virtio clients may not send VHOST_USER_SET_MEM_TABLE for
some reason. This causes NULL dereference in qva_to_vva().
Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/virtio-net.c
patch
|
blob
|
history
diff --git
a/lib/librte_vhost/virtio-net.c
b/lib/librte_vhost/virtio-net.c
index
e189c74
..
fe1a77e
100644
(file)
--- a/
lib/librte_vhost/virtio-net.c
+++ b/
lib/librte_vhost/virtio-net.c
@@
-632,7
+632,7
@@
vhost_set_vring_addr(struct vhost_device_ctx ctx, struct vhost_vring_addr *addr)
struct vhost_virtqueue *vq;
dev = get_device(ctx);
- if (
dev == NULL
)
+ if (
(dev == NULL) || (dev->mem == NULL)
)
return -1;
/* addr->index refers to the queue index. The txq 1, rxq is 0. */