[dpdk-stable] patch 'common/sfc_efx/base: fix dereferencing null pointer' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Sat Jun 12 01:02:03 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 3085e8ab3e33471bbbc198d5c5038cf045a27da0 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3 at huawei.com>
Date: Sun, 25 Apr 2021 20:58:16 +0800
Subject: [PATCH] common/sfc_efx/base: fix dereferencing null pointer
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 3de9af2aaa680b33a9a597b8ec4d76163dee2029 ]

In function efx_pci_xilinx_cap_tbl_find, pointer entry_offsetp is used
before null pointer check, which may cause access to null pointer.

This patch fix this problem.

Fixes: ba9568b8b4b7 ("common/sfc_efx/base: add Xilinx capabilities table lookup")

Signed-off-by: Hongbo Zheng <zhenghongbo3 at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 drivers/common/sfc_efx/base/efx_pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/efx_pci.c b/drivers/common/sfc_efx/base/efx_pci.c
index 1e7307476f..83c9e0449d 100644
--- a/drivers/common/sfc_efx/base/efx_pci.c
+++ b/drivers/common/sfc_efx/base/efx_pci.c
@@ -310,7 +310,7 @@ efx_pci_xilinx_cap_tbl_find(
 	__in				boolean_t skip_first,
 	__inout				efsys_dma_addr_t *entry_offsetp)
 {
-	efsys_dma_addr_t offset = *entry_offsetp;
+	efsys_dma_addr_t offset;
 	boolean_t skip = skip_first;
 	efx_qword_t header;
 	uint32_t format;
@@ -322,6 +322,7 @@ efx_pci_xilinx_cap_tbl_find(
 		goto fail1;
 	}
 
+	offset = *entry_offsetp;
 	rc = ENOENT;
 	/*
 	 * SF-119689-TC Riverhead Host Interface section 4.2.2.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.441798200 +0800
+++ 0029-common-sfc_efx-base-fix-dereferencing-null-pointer.patch	2021-06-12 06:53:56.150000000 +0800
@@ -1 +1 @@
-From 3de9af2aaa680b33a9a597b8ec4d76163dee2029 Mon Sep 17 00:00:00 2001
+From 3085e8ab3e33471bbbc198d5c5038cf045a27da0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 3de9af2aaa680b33a9a597b8ec4d76163dee2029 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 8a26da68a9..9c7cacbdec 100644
+index 1e7307476f..83c9e0449d 100644


More information about the stable mailing list