[dpdk-stable] patch 'crypto/qat: fix access to uninitialized variable' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:16:55 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cf7cd53c7a3f988b47d529e212e18f9a547229ba

Thanks.

Luca Boccassi

---
>From cf7cd53c7a3f988b47d529e212e18f9a547229ba Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Date: Tue, 15 Dec 2020 18:23:51 +0000
Subject: [PATCH] crypto/qat: fix access to uninitialized variable

[ upstream commit 87086b3398edf20d46628481a2959a40ad95b477 ]

QAT_LOG() has access to the uninitialized variable "name"

Fixes: 21792c443205 ("crypto/qat: add multi-process handling of driver ID")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal at intel.com>
Acked-by: Declan Doherty <declan.doherty at intel.com>
---
 drivers/crypto/qat/qat_asym_pmd.c | 8 ++++----
 drivers/crypto/qat/qat_sym_pmd.c  | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c
index ed8a2a50b4..a2c8aca2c1 100644
--- a/drivers/crypto/qat/qat_asym_pmd.c
+++ b/drivers/crypto/qat/qat_asym_pmd.c
@@ -251,6 +251,10 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
 	struct rte_cryptodev *cryptodev;
 	struct qat_asym_dev_private *internals;
 
+	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
+			qat_pci_dev->name, "asym");
+	QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
+
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		qat_pci_dev->qat_asym_driver_id =
 				qat_asym_driver_id;
@@ -264,10 +268,6 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
 		}
 	}
 
-	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
-			qat_pci_dev->name, "asym");
-	QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
-
 	/* Populate subset device to use in cryptodev device creation */
 	qat_dev_instance->asym_rte_dev.driver = &cryptodev_qat_asym_driver;
 	qat_dev_instance->asym_rte_dev.numa_node =
diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c
index 6da9512fe4..93666fdade 100644
--- a/drivers/crypto/qat/qat_sym_pmd.c
+++ b/drivers/crypto/qat/qat_sym_pmd.c
@@ -330,6 +330,10 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
 	const struct rte_cryptodev_capabilities *capabilities;
 	uint64_t capa_size;
 
+	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
+			qat_pci_dev->name, "sym");
+	QAT_LOG(DEBUG, "Creating QAT SYM device %s", name);
+
 	/*
 	 * All processes must use same driver id so they can share sessions.
 	 * Store driver_id so we can validate that all processes have the same
@@ -349,10 +353,6 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev,
 		}
 	}
 
-	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
-			qat_pci_dev->name, "sym");
-	QAT_LOG(DEBUG, "Creating QAT SYM device %s", name);
-
 	/* Populate subset device to use in cryptodev device creation */
 	qat_dev_instance->sym_rte_dev.driver = &cryptodev_qat_sym_driver;
 	qat_dev_instance->sym_rte_dev.numa_node =
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.951697273 +0000
+++ 0129-crypto-qat-fix-access-to-uninitialized-variable.patch	2021-02-05 11:18:29.002694843 +0000
@@ -1 +1 @@
-From 87086b3398edf20d46628481a2959a40ad95b477 Mon Sep 17 00:00:00 2001
+From cf7cd53c7a3f988b47d529e212e18f9a547229ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 87086b3398edf20d46628481a2959a40ad95b477 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list