diff mbox series

[3/8] net/dpaa: fix the array overrun

Message ID 1522918464-4586-3-git-send-email-hemant.agrawal@nxp.com
State Superseded
Headers show
Series [1/8] bus/dpaa: fix the resource leak issue | expand

Commit Message

Hemant Agrawal April 5, 2018, 8:54 a.m. UTC
Fixes: 62f53995caaf ("net/dpaa: add frame count based tail drop with CGR")
Coverity issue: 268342
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

---
 drivers/net/dpaa/dpaa_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4

Comments

Shreyansh Jain April 9, 2018, 5:29 a.m. UTC | #1
On Thursday 05 April 2018 02:24 PM, Hemant Agrawal wrote:
> Fixes: 62f53995caaf ("net/dpaa: add frame count based tail drop with CGR")

> Coverity issue: 268342

> Cc: stable@dpdk.org

> 

> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

> ---


Acked-By: Shreyansh Jain <shreyansh.jain@nxp.com>
diff mbox series

Patch

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index db49364..0aad111 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1105,10 +1105,10 @@  dpaa_dev_init(struct rte_eth_dev *eth_dev)
 			dpaa_push_mode_max_queue = DPAA_MAX_PUSH_MODE_QUEUE;
 	}
 
-	/* Each device can not have more than DPAA_PCD_FQID_MULTIPLIER RX
+	/* Each device can not have more than DPAA_MAX_NUM_PCD_QUEUES RX
 	 * queues.
 	 */
-	if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_PCD_FQID_MULTIPLIER) {
+	if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_MAX_NUM_PCD_QUEUES) {
 		DPAA_PMD_ERR("Invalid number of RX queues\n");
 		return -EINVAL;
 	}