Skip to content

Commit

Permalink
net/mvpp2: fix stack corruption
Browse files Browse the repository at this point in the history
[ upstream commit 8ce3c5d ]

Fixes stack corruption in mrvl_fill_bpool function
in case num > MRVL_PP2_RXD_MAX

Fixes: c363725 ("net/mrvl: fix Rx descriptors number")

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
  • Loading branch information
mvyuri authored and bluca committed Feb 4, 2021
1 parent 3cac3c8 commit 9057ace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/mvpp2/mrvl_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1614,8 +1614,8 @@ mrvl_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
static int
mrvl_fill_bpool(struct mrvl_rxq *rxq, int num)
{
struct buff_release_entry entries[MRVL_PP2_RXD_MAX];
struct rte_mbuf *mbufs[MRVL_PP2_RXD_MAX];
struct buff_release_entry entries[num];
struct rte_mbuf *mbufs[num];
int i, ret;
unsigned int core_id;
struct pp2_hif *hif;
Expand Down

0 comments on commit 9057ace

Please sign in to comment.