Skip to content

Commit

Permalink
dpdk vrouter crash in rte_port_ethdev_writer_flush
Browse files Browse the repository at this point in the history
closes-jira-bug: CEM-4321
out of bound array write in bond driver code.
Array bufs_slave_port_idxs was not defined properly.

Change-Id: I9bcfafafe7bd9106ecb8b9afb921f8269a330136
  • Loading branch information
Jeya ganesh babu J committed Apr 2, 2019
1 parent 332dac0 commit 9561a8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/bonding/rte_eth_bond_pmd.c
Expand Up @@ -297,7 +297,7 @@ bond_ethdev_tx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
/* Number of mbufs for transmission on each slave */
uint16_t slave_nb_bufs[RTE_MAX_ETHPORTS] = { 0 };
/* Mapping array generated by hash function to map mbufs to slaves */
uint16_t bufs_slave_port_idxs[RTE_MAX_ETHPORTS] = { 0 };
uint16_t bufs_slave_port_idxs[nb_bufs];

uint16_t slave_tx_count;
uint16_t total_tx_count = 0, total_tx_fail_count = 0;
Expand Down Expand Up @@ -1272,7 +1272,7 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
/* Number of mbufs for transmission on each slave */
uint16_t slave_nb_bufs[RTE_MAX_ETHPORTS] = { 0 };
/* Mapping array generated by hash function to map mbufs to slaves */
uint16_t bufs_slave_port_idxs[RTE_MAX_ETHPORTS] = { 0 };
uint16_t bufs_slave_port_idxs[nb_bufs];

uint16_t slave_tx_count;
uint16_t total_tx_count = 0, total_tx_fail_count = 0;
Expand Down

0 comments on commit 9561a8b

Please sign in to comment.