* [dpdk-dev] [PATCH] crypto/qat: fix possible access to an uninitialized variable
@ 2020-12-15 18:23 Vladimir Medvedkin
2020-12-16 6:34 ` Kusztal, ArkadiuszX
2020-12-16 11:47 ` Doherty, Declan
0 siblings, 2 replies; 4+ messages in thread
From: Vladimir Medvedkin @ 2020-12-15 18:23 UTC (permalink / raw)
To: dev; +Cc: arkadiuszx.kusztal, john.griffin, fiona.trahe, deepak.k.jain, stable
QAT_LOG() has access to the uninitialized variable "name"
Fixes: 21792c443205 ("crypto/qat: add multi-process handling of driver ID")
Cc: stable@dpdk.org
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@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 ed8a2a5..a2c8aca 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 6da9512..93666fd 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.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix possible access to an uninitialized variable
2020-12-15 18:23 [dpdk-dev] [PATCH] crypto/qat: fix possible access to an uninitialized variable Vladimir Medvedkin
@ 2020-12-16 6:34 ` Kusztal, ArkadiuszX
2021-01-15 16:00 ` Akhil Goyal
2020-12-16 11:47 ` Doherty, Declan
1 sibling, 1 reply; 4+ messages in thread
From: Kusztal, ArkadiuszX @ 2020-12-16 6:34 UTC (permalink / raw)
To: Medvedkin, Vladimir, dev
Cc: Griffin, John, Trahe, Fiona, Jain, Deepak K, stable
> -----Original Message-----
> From: Medvedkin, Vladimir <vladimir.medvedkin@intel.com>
> Sent: wtorek, 15 grudnia 2020 19:24
> To: dev@dpdk.org
> Cc: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Griffin, John
> <john.griffin@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>; Jain, Deepak K
> <deepak.k.jain@intel.com>; stable@dpdk.org
> Subject: [PATCH] crypto/qat: fix possible access to an uninitialized variable
>
> QAT_LOG() has access to the uninitialized variable "name"
>
> Fixes: 21792c443205 ("crypto/qat: add multi-process handling of driver ID")
> Cc: stable@dpdk.org
>
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---
> 2.7.4
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix possible access to an uninitialized variable
2020-12-15 18:23 [dpdk-dev] [PATCH] crypto/qat: fix possible access to an uninitialized variable Vladimir Medvedkin
2020-12-16 6:34 ` Kusztal, ArkadiuszX
@ 2020-12-16 11:47 ` Doherty, Declan
1 sibling, 0 replies; 4+ messages in thread
From: Doherty, Declan @ 2020-12-16 11:47 UTC (permalink / raw)
To: Vladimir Medvedkin, dev
Cc: arkadiuszx.kusztal, john.griffin, fiona.trahe, deepak.k.jain, stable
On 15/12/2020 6:23 PM, Vladimir Medvedkin wrote:
> QAT_LOG() has access to the uninitialized variable "name"
>
> Fixes: 21792c443205 ("crypto/qat: add multi-process handling of driver ID")
> Cc: stable@dpdk.org
>
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---
>
Acked-by: Declan Doherty <declan.doherty@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/qat: fix possible access to an uninitialized variable
2020-12-16 6:34 ` Kusztal, ArkadiuszX
@ 2021-01-15 16:00 ` Akhil Goyal
0 siblings, 0 replies; 4+ messages in thread
From: Akhil Goyal @ 2021-01-15 16:00 UTC (permalink / raw)
To: Kusztal, ArkadiuszX, Medvedkin, Vladimir, dev
Cc: Griffin, John, Trahe, Fiona, Jain, Deepak K, stable
>
> > -----Original Message-----
> > From: Medvedkin, Vladimir <vladimir.medvedkin@intel.com>
> > Sent: wtorek, 15 grudnia 2020 19:24
> > To: dev@dpdk.org
> > Cc: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>; Griffin, John
> > <john.griffin@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>; Jain, Deepak
> K
> > <deepak.k.jain@intel.com>; stable@dpdk.org
> > Subject: [PATCH] crypto/qat: fix possible access to an uninitialized variable
> >
> > QAT_LOG() has access to the uninitialized variable "name"
> >
> > Fixes: 21792c443205 ("crypto/qat: add multi-process handling of driver ID")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> > ---
> > 2.7.4
>
> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-15 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 18:23 [dpdk-dev] [PATCH] crypto/qat: fix possible access to an uninitialized variable Vladimir Medvedkin
2020-12-16 6:34 ` Kusztal, ArkadiuszX
2021-01-15 16:00 ` Akhil Goyal
2020-12-16 11:47 ` Doherty, Declan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).