[dpdk-stable] patch 'bus/fslmc: fix iterating on a class type' has been queued to stable release 19.11.4
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Jul 24 13:58:24 CEST 2020
Hi,
FYI, your patch has been queued to stable release 19.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 07/26/20. 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.
Thanks.
Luca Boccassi
---
>From f232d2d9db3324a689ac6c5cfc9cadd6c165c1d3 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Fri, 26 Jun 2020 16:04:29 +0200
Subject: [PATCH] bus/fslmc: fix iterating on a class type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 44255245433b3b4394474db100d478341aeb08fc ]
This patches fixes a null pointer dereferencing that happens
when the device string passed to the iterator is NULL. This
situation can happen when iterating on a class type.
For example:
RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) {
...
}
Fixes: e67a61614d0b ("bus/fslmc: support device iteration")
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Adrián Moreno <amorenoz at redhat.com>
---
drivers/bus/fslmc/fslmc_bus.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index b3e964aa9..7431177f2 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -608,6 +608,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
struct rte_dpaa2_device *dev;
char *dup, *dev_name = NULL;
+ if (str == NULL) {
+ DPAA2_BUS_DEBUG("No device string");
+ return NULL;
+ }
+
/* Expectation is that device would be name=device_name */
if (strncmp(str, "name=", 5) != 0) {
DPAA2_BUS_DEBUG("Invalid device string (%s)\n", str);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-07-24 12:53:51.141507409 +0100
+++ 0066-bus-fslmc-fix-iterating-on-a-class-type.patch 2020-07-24 12:53:48.287006460 +0100
@@ -1,4 +1,4 @@
-From 44255245433b3b4394474db100d478341aeb08fc Mon Sep 17 00:00:00 2001
+From f232d2d9db3324a689ac6c5cfc9cadd6c165c1d3 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Fri, 26 Jun 2020 16:04:29 +0200
Subject: [PATCH] bus/fslmc: fix iterating on a class type
@@ -6,6 +6,8 @@
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
+[ upstream commit 44255245433b3b4394474db100d478341aeb08fc ]
+
This patches fixes a null pointer dereferencing that happens
when the device string passed to the iterator is NULL. This
situation can happen when iterating on a class type.
@@ -16,7 +18,6 @@
}
Fixes: e67a61614d0b ("bus/fslmc: support device iteration")
-Cc: stable at dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Adrián Moreno <amorenoz at redhat.com>
@@ -25,10 +26,10 @@
1 file changed, 5 insertions(+)
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
-index afbd82e8d..ac46eb4fe 100644
+index b3e964aa9..7431177f2 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
-@@ -603,6 +603,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
+@@ -608,6 +608,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
struct rte_dpaa2_device *dev;
char *dup, *dev_name = NULL;
More information about the stable
mailing list