[dpdk-stable] patch 'bus/dpaa: 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:23 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 3f26d928cf387a3d333a36ed8d92e0bd2c2bb95c Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Fri, 26 Jun 2020 16:04:28 +0200
Subject: [PATCH] bus/dpaa: fix iterating on a class type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit be2ee360fe86cf041d1a07577919160e6557c679 ]

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: e79df833d3f6 ("bus/dpaa: support hotplug ops")

Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Adrián Moreno <amorenoz at redhat.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index f27820db3..327d9269f 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -700,6 +700,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
 	struct rte_dpaa_device *dev;
 	char *dup, *dev_name = NULL;
 
+	if (str == NULL) {
+		DPAA_BUS_DEBUG("No device string");
+		return NULL;
+	}
+
 	/* Expectation is that device would be name=device_name */
 	if (strncmp(str, "name=", 5) != 0) {
 		DPAA_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.106331209 +0100
+++ 0065-bus-dpaa-fix-iterating-on-a-class-type.patch	2020-07-24 12:53:48.287006460 +0100
@@ -1,4 +1,4 @@
-From be2ee360fe86cf041d1a07577919160e6557c679 Mon Sep 17 00:00:00 2001
+From 3f26d928cf387a3d333a36ed8d92e0bd2c2bb95c Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin at redhat.com>
 Date: Fri, 26 Jun 2020 16:04:28 +0200
 Subject: [PATCH] bus/dpaa: fix iterating on a class type
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit be2ee360fe86cf041d1a07577919160e6557c679 ]
+
 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: e79df833d3f6 ("bus/dpaa: support hotplug ops")
-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/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
-index d53fe6083..591e28c1e 100644
+index f27820db3..327d9269f 100644
 --- a/drivers/bus/dpaa/dpaa_bus.c
 +++ b/drivers/bus/dpaa/dpaa_bus.c
-@@ -703,6 +703,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
+@@ -700,6 +700,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
  	struct rte_dpaa_device *dev;
  	char *dup, *dev_name = NULL;
  


More information about the stable mailing list