Reviewed-by: Michael Shamis <[email protected]>

-----Original Message-----
From: dev <[email protected]> On Behalf Of [email protected]
Sent: Wednesday, December 2, 2020 12:12 PM
To: Jerin Jacob Kollanukkaran <[email protected]>
Cc: [email protected]; Yuri Chipchev <[email protected]>; [email protected]; Liron 
Himi <[email protected]>
Subject: [dpdk-dev] [PATCH v1 01/38] net/mvpp2: fix stack corruption

From: Yuri Chipchev <[email protected]>

Fixes stack corruption in mrvl_fill_bpool function in case num > 
MRVL_PP2_RXD_MAX

Fixes: c3637258d894 ("net/mrvl: fix Rx descriptors number")
Cc: [email protected]

Signed-off-by: Yuri Chipchev <[email protected]>
Reviewed-by: Liron Himi <[email protected]>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c 
index f25cf9e46..93fb30cdb 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -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;
--
2.28.0

Reply via email to