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:
c8b506e
)
vhost: fix possible out of bound access
author
Ferruh Yigit
<ferruh.yigit@intel.com>
Sun, 28 Oct 2018 01:08:46 +0000
(
01:08
+0000)
committer
Thomas Monjalon
<thomas@monjalon.net>
Tue, 6 Nov 2018 00:14:23 +0000
(
01:14
+0100)
Fixes:
d7280c9fffcb
("vhost: support selective datapath")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vdpa.c
patch
|
blob
|
history
diff --git
a/lib/librte_vhost/vdpa.c
b/lib/librte_vhost/vdpa.c
index
c2c5dff
..
e7d849e
100644
(file)
--- a/
lib/librte_vhost/vdpa.c
+++ b/
lib/librte_vhost/vdpa.c
@@
-63,6
+63,9
@@
rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr,
break;
}
+ if (i == MAX_VHOST_DEVICE)
+ return -1;
+
sprintf(device_name, "vdpa-dev-%d", i);
dev = rte_zmalloc(device_name, sizeof(struct rte_vdpa_device),
RTE_CACHE_LINE_SIZE);