patch 'eal: fix device iterator when no bus is selected' has been queued to stable release 19.11.11

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Nov 30 17:35:11 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/2ce7e45bf97132b85b9f0b558ce09ff332c8aa7b

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 2ce7e45bf97132b85b9f0b558ce09ff332c8aa7b Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl at nvidia.com>
Date: Wed, 27 Oct 2021 16:22:21 +0800
Subject: [PATCH] eal: fix device iterator when no bus is selected

[ upstream commit fc382022c6adcde57eb30e58186198275ad493d7 ]

Devargs used in device iterator initialization wasn't set to zero, random
data like bus string lead to invalid address access.

This patch initializes devargs.

Bugzilla ID: 862
Fixes: c99a2d4c6b7f ("eal: implement device iteration initialization")

Signed-off-by: Xueming Li <xuemingl at nvidia.com>
---
 lib/librte_eal/common/eal_common_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 363a2ca95e..9d56a0e292 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -567,7 +567,7 @@ int
 rte_dev_iterator_init(struct rte_dev_iterator *it,
 		      const char *dev_str)
 {
-	struct rte_devargs devargs;
+	struct rte_devargs devargs = { .bus = NULL };
 	struct rte_class *cls = NULL;
 	struct rte_bus *bus = NULL;
 
-- 
2.34.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-30 16:50:12.018147916 +0100
+++ 0107-eal-fix-device-iterator-when-no-bus-is-selected.patch	2021-11-30 16:50:05.910874410 +0100
@@ -1 +1 @@
-From fc382022c6adcde57eb30e58186198275ad493d7 Mon Sep 17 00:00:00 2001
+From 2ce7e45bf97132b85b9f0b558ce09ff332c8aa7b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fc382022c6adcde57eb30e58186198275ad493d7 ]
+
@@ -13 +14,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
- lib/eal/common/eal_common_dev.c | 2 +-
+ lib/librte_eal/common/eal_common_dev.c | 2 +-
@@ -20,5 +21,5 @@
-diff --git a/lib/eal/common/eal_common_dev.c b/lib/eal/common/eal_common_dev.c
-index 148a23830a..e1e9976d8d 100644
---- a/lib/eal/common/eal_common_dev.c
-+++ b/lib/eal/common/eal_common_dev.c
-@@ -573,7 +573,7 @@ int
+diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
+index 363a2ca95e..9d56a0e292 100644
+--- a/lib/librte_eal/common/eal_common_dev.c
++++ b/lib/librte_eal/common/eal_common_dev.c
+@@ -567,7 +567,7 @@ int


More information about the stable mailing list