[dpdk-stable] patch 'net/bnxt: fix null dereference in interrupt handler' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 26 15:53:00 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/806a18751b2029a1fc83c44be59f9ef266673c27

Thanks.

Luca Boccassi

---
>From 806a18751b2029a1fc83c44be59f9ef266673c27 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Date: Tue, 20 Jul 2021 21:51:58 +0530
Subject: [PATCH] net/bnxt: fix null dereference in interrupt handler

[ upstream commit 3f44ec48c733f7d7607877164c9aa0305de9cecd ]

Coverity reports that pointer "cpr->cp_ring_struct" may be
dereferenced with null value. This patch fixes this.

Coverity issue: 372063
Fixes: 5ed30db87fa8 ("net/bnxt: fix missing barriers in completion handling")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson at broadcom.com>
---
 drivers/net/bnxt/bnxt_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 14075e41d2..1a99508572 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -33,7 +33,6 @@ void bnxt_int_handler(void *param)
 		return;
 
 	raw_cons = cpr->cp_raw_cons;
-	cp_ring_size = cpr->cp_ring_struct->ring_size;
 	pthread_mutex_lock(&bp->def_cp_lock);
 	while (1) {
 		if (!cpr || !cpr->cp_ring_struct || !cpr->cp_db.doorbell) {
@@ -46,6 +45,7 @@ void bnxt_int_handler(void *param)
 			return;
 		}
 
+		cp_ring_size = cpr->cp_ring_struct->ring_size;
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
 		cmp = &cpr->cp_desc_ring[cons];
 
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-07-26 13:53:17.822810395 +0100
+++ 0037-net-bnxt-fix-null-dereference-in-interrupt-handler.patch	2021-07-26 13:53:15.893293547 +0100
@@ -1 +1 @@
-From 3f44ec48c733f7d7607877164c9aa0305de9cecd Mon Sep 17 00:00:00 2001
+From 806a18751b2029a1fc83c44be59f9ef266673c27 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3f44ec48c733f7d7607877164c9aa0305de9cecd ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index ebdac8385d..122a1f9908 100644
+index 14075e41d2..1a99508572 100644


More information about the stable mailing list