[dpdk-stable] patch 'net/bnxt: fix a potential null pointer dereference' has been queued to LTS release 16.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 2 13:02:44 CET 2017


Hi,

FYI, your patch has been queued to LTS release 16.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/04/17. So please
shout if anyone has objections.

Thanks.

Kind regards,
Luca Boccassi

---
>From 67335de26faa652432d7b6fb5d0b51782aad9316 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Tue, 24 Oct 2017 16:19:49 -0500
Subject: [PATCH] net/bnxt: fix a potential null pointer dereference

[ upstream commit 8ec40353d4b1aacb9158755f3e82a8a9ee7df59c ]

Coverity issue: 195046
Fixes: f7ecea911ec5 ("net/bnxt: fix interrupt handler")

Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt_irq.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 7e1482782..851f39caa 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -51,10 +51,14 @@ static void bnxt_int_handler(struct rte_intr_handle *handle __rte_unused,
 	struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
 	struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
 	struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
-	uint32_t raw_cons = cpr->cp_raw_cons;
-	uint32_t cons;
 	struct cmpl_base *cmp;
+	uint32_t raw_cons;
+	uint32_t cons;
 
+	if (cpr == NULL)
+		return;
+
+	raw_cons = cpr->cp_raw_cons;
 	while (1) {
 		if (!cpr || !cpr->cp_ring_struct)
 			return;
-- 
2.11.0



More information about the stable mailing list