patch 'net/i40e/base: fix potentially uninitialized variables' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:34:46 CET 2021


Hi,

FYI, your patch has been queued to stable release 19.11.11

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/8406d53dc9b5a5c63677504a6537dbf9b0174695

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 8406d53dc9b5a5c63677504a6537dbf9b0174695 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

[ 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 0c07ff0045..48f9d8071a 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -587,8 +587,10 @@ STATIC void i40e_resume_aq(struct i40e_hw *hw)
 enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 #ifdef PF_DRIVER
-	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;
 #endif
 	enum i40e_status_code ret_code;
 #ifdef PF_DRIVER
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:10.701500898 +0100
+++ 0082-net-i40e-base-fix-potentially-uninitialized-variable.patch	2021-11-30 16:50:05.858874029 +0100
@@ -1 +1 @@
-From bc99971d1021ecc85280b9b98e84c9b5f4ba008e Mon Sep 17 00:00:00 2001
+From 8406d53dc9b5a5c63677504a6537dbf9b0174695 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bc99971d1021ecc85280b9b98e84c9b5f4ba008e ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -23 +24 @@
-index 38d3429e5b..27c82d9b44 100644
+index 0c07ff0045..48f9d8071a 100644
@@ -26 +27,2 @@
-@@ -652,8 +652,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
+@@ -587,8 +587,10 @@ STATIC void i40e_resume_aq(struct i40e_hw *hw)
+ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
@@ -28,2 +30 @@
- 	struct i40e_adminq_info *aq = &hw->aq;
- 	enum i40e_status_code ret_code;
+ #ifdef PF_DRIVER
@@ -36,3 +37,3 @@
- 	int retry = 0;
- 
- 	/* verify input for valid configuration */
+ #endif
+ 	enum i40e_status_code ret_code;
+ #ifdef PF_DRIVER


More information about the stable mailing list