[dpdk-stable] patch 'net/i40e/base: fix potentially uninitialized variables' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:30:31 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.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/12/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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/50dcbcd809225687f2da84e11b60742fce7fef68

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 50dcbcd809225687f2da84e11b60742fce7fef68 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang at intel.com>
Date: Sat, 9 Oct 2021 01:39:50 +0000
Subject: [PATCH] net/i40e/base: fix potentially uninitialized variables
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit bc99971d1021ecc85280b9b98e84c9b5f4ba008e ]

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")

Signed-off-by: Christopher Pau <christopher.pau at intel.com>
Signed-off-by: Robin Zhang <robinx.zhang at intel.com>
Acked-by: Beilei Xing <beilei.xing at intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 235667d57a..c63a38e900 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -652,8 +652,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 	struct i40e_adminq_info *aq = &hw->aq;
 	enum i40e_status_code ret_code;
-	u16 cfg_ptr, oem_hi, oem_lo;
-	u16 eetrack_lo, eetrack_hi;
+	u16 oem_hi = 0, oem_lo = 0;
+	u16 eetrack_hi = 0;
+	u16 eetrack_lo = 0;
+	u16 cfg_ptr = 0;
 	int retry = 0;
 
 	/* verify input for valid configuration */
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:08.479979630 +0800
+++ 0147-net-i40e-base-fix-potentially-uninitialized-variable.patch	2021-11-10 14:17:01.934078906 +0800
@@ -1 +1 @@
-From bc99971d1021ecc85280b9b98e84c9b5f4ba008e Mon Sep 17 00:00:00 2001
+From 50dcbcd809225687f2da84e11b60742fce7fef68 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit bc99971d1021ecc85280b9b98e84c9b5f4ba008e ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -23 +25 @@
-index 38d3429e5b..27c82d9b44 100644
+index 235667d57a..c63a38e900 100644


More information about the stable mailing list