[dpdk-stable] patch 'eal: fix device iterator when no bus is selected' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:31:30 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/d02f2de893f028899690957a8883aea4889c9983

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From d02f2de893f028899690957a8883aea4889c9983 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
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 8a3bd3100a..3358f1328a 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -575,7 +575,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.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:11.022832241 +0800
+++ 0206-eal-fix-device-iterator-when-no-bus-is-selected.patch	2021-11-10 14:17:02.017411557 +0800
@@ -1 +1 @@
-From fc382022c6adcde57eb30e58186198275ad493d7 Mon Sep 17 00:00:00 2001
+From d02f2de893f028899690957a8883aea4889c9983 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit fc382022c6adcde57eb30e58186198275ad493d7 ]
@@ -13 +15,0 @@
-Cc: stable at dpdk.org
@@ -17 +19 @@
- lib/eal/common/eal_common_dev.c | 2 +-
+ lib/librte_eal/common/eal_common_dev.c | 2 +-
@@ -20,5 +22,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 8a3bd3100a..3358f1328a 100644
+--- a/lib/librte_eal/common/eal_common_dev.c
++++ b/lib/librte_eal/common/eal_common_dev.c
+@@ -575,7 +575,7 @@ int


More information about the stable mailing list