[dpdk-stable] patch 'net/bnxt: fix crash in xstats get' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:34:33 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/21/19. 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.

Thanks.

Luca Boccassi

---
>From a3bb3ab471da859ee6fe3cb83f846c1665dc4142 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Wed, 13 Nov 2019 13:59:43 +0530
Subject: [PATCH] net/bnxt: fix crash in xstats get

[ upstream commit 063e59ddd28e3a147107366ddba9fb8baeeebc31 ]

We would hit a segfault in bnxt_dev_xstats_get_op() if xstats argument
is NULL, Check if the argument is NULL and return appropriately.

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")

Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
Reviewed-by: Andy Gospodarek <gospo at broadcom.com>
---
 drivers/net/bnxt/bnxt_stats.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 02e8e6ecbd..287624c5d2 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -316,6 +316,9 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
 		return 0;
 	}
 
+	if (xstats == NULL)
+		return 0;
+
 	bnxt_hwrm_port_qstats(bp);
 	bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, &tx_drop_pkts);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:31.345816146 +0000
+++ 0126-net-bnxt-fix-crash-in-xstats-get.patch	2019-12-19 14:32:26.329302267 +0000
@@ -1,13 +1,14 @@
-From 063e59ddd28e3a147107366ddba9fb8baeeebc31 Mon Sep 17 00:00:00 2001
+From a3bb3ab471da859ee6fe3cb83f846c1665dc4142 Mon Sep 17 00:00:00 2001
 From: Ajit Khaparde <ajit.khaparde at broadcom.com>
 Date: Wed, 13 Nov 2019 13:59:43 +0530
 Subject: [PATCH] net/bnxt: fix crash in xstats get
 
+[ upstream commit 063e59ddd28e3a147107366ddba9fb8baeeebc31 ]
+
 We would hit a segfault in bnxt_dev_xstats_get_op() if xstats argument
 is NULL, Check if the argument is NULL and return appropriately.
 
 Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")
-Cc: stable at dpdk.org
 
 Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
 Reviewed-by: Andy Gospodarek <gospo at broadcom.com>
@@ -16,19 +17,19 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
-index 40b496ac00..14d355fd08 100644
+index 02e8e6ecbd..287624c5d2 100644
 --- a/drivers/net/bnxt/bnxt_stats.c
 +++ b/drivers/net/bnxt/bnxt_stats.c
-@@ -468,6 +468,9 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
- 	if (rc)
- 		return rc;
+@@ -316,6 +316,9 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
+ 		return 0;
+ 	}
  
 +	if (xstats == NULL)
 +		return 0;
 +
- 	memset(xstats, 0, sizeof(*xstats));
- 
  	bnxt_hwrm_port_qstats(bp);
+ 	bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, &tx_drop_pkts);
+ 
 -- 
 2.20.1
 


More information about the stable mailing list