* [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference
@ 2016-11-15 19:11 Jerin Jacob
2016-11-16 12:11 ` Kusztal, ArkadiuszX
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jerin Jacob @ 2016-11-15 19:11 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, Jerin Jacob
crypodev->data->name will be null when
rte_cryptodev_get_dev_id() invoked without a valid
crypto device instance.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
lib/librte_cryptodev/rte_cryptodev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 127e8d0..54e95d5 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -225,13 +225,14 @@ rte_cryptodev_create_vdev(const char *name, const char *args)
}
int
-rte_cryptodev_get_dev_id(const char *name) {
+rte_cryptodev_get_dev_id(const char *name)
+{
unsigned i;
if (name == NULL)
return -1;
- for (i = 0; i < rte_cryptodev_globals->max_devs; i++)
+ for (i = 0; i < rte_cryptodev_globals->nb_devs; i++)
if ((strcmp(rte_cryptodev_globals->devs[i].data->name, name)
== 0) &&
(rte_cryptodev_globals->devs[i].attached ==
--
2.5.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference
2016-11-15 19:11 [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference Jerin Jacob
@ 2016-11-16 12:11 ` Kusztal, ArkadiuszX
2016-11-30 15:10 ` De Lara Guarch, Pablo
2016-12-03 18:34 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
2 siblings, 0 replies; 6+ messages in thread
From: Kusztal, ArkadiuszX @ 2016-11-16 12:11 UTC (permalink / raw)
To: Jerin Jacob, dev; +Cc: Doherty, Declan
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob
> Sent: Tuesday, November 15, 2016 7:12 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference
>
> crypodev->data->name will be null when
> rte_cryptodev_get_dev_id() invoked without a valid crypto device instance.
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---
> lib/librte_cryptodev/rte_cryptodev.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> --
> 2.5.5
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference
2016-11-15 19:11 [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference Jerin Jacob
2016-11-16 12:11 ` Kusztal, ArkadiuszX
@ 2016-11-30 15:10 ` De Lara Guarch, Pablo
2016-11-30 20:36 ` Jerin Jacob
2016-12-03 18:34 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
2 siblings, 1 reply; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2016-11-30 15:10 UTC (permalink / raw)
To: Jerin Jacob, dev; +Cc: Doherty, Declan
Hi Jerin,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob
> Sent: Tuesday, November 15, 2016 7:12 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan; Jerin Jacob
> Subject: [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference
>
> crypodev->data->name will be null when
> rte_cryptodev_get_dev_id() invoked without a valid
> crypto device instance.
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Could you add a "Fixes" line?
Thanks,
Pablo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference
2016-11-30 15:10 ` De Lara Guarch, Pablo
@ 2016-11-30 20:36 ` Jerin Jacob
0 siblings, 0 replies; 6+ messages in thread
From: Jerin Jacob @ 2016-11-30 20:36 UTC (permalink / raw)
To: De Lara Guarch, Pablo; +Cc: dev, Doherty, Declan
On Wed, Nov 30, 2016 at 03:10:14PM +0000, De Lara Guarch, Pablo wrote:
> Hi Jerin,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob
> > Sent: Tuesday, November 15, 2016 7:12 PM
> > To: dev@dpdk.org
> > Cc: Doherty, Declan; Jerin Jacob
> > Subject: [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference
> >
> > crypodev->data->name will be null when
> > rte_cryptodev_get_dev_id() invoked without a valid
> > crypto device instance.
> >
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
>
> Could you add a "Fixes" line?
Sure. I will send the v2 then
>
> Thanks,
> Pablo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v2] cryptodev: fix crash on null dereference
2016-11-15 19:11 [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference Jerin Jacob
2016-11-16 12:11 ` Kusztal, ArkadiuszX
2016-11-30 15:10 ` De Lara Guarch, Pablo
@ 2016-12-03 18:34 ` Jerin Jacob
2016-12-09 12:06 ` De Lara Guarch, Pablo
2 siblings, 1 reply; 6+ messages in thread
From: Jerin Jacob @ 2016-12-03 18:34 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, pablo.de.lara.guarch, Jerin Jacob, stable
crypodev->data->name will be null when
rte_cryptodev_get_dev_id() invoked without a valid
crypto device instance.
Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
CC: stable@dpdk.org
---
lib/librte_cryptodev/rte_cryptodev.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 127e8d0..54e95d5 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -225,13 +225,14 @@ rte_cryptodev_create_vdev(const char *name, const char *args)
}
int
-rte_cryptodev_get_dev_id(const char *name) {
+rte_cryptodev_get_dev_id(const char *name)
+{
unsigned i;
if (name == NULL)
return -1;
- for (i = 0; i < rte_cryptodev_globals->max_devs; i++)
+ for (i = 0; i < rte_cryptodev_globals->nb_devs; i++)
if ((strcmp(rte_cryptodev_globals->devs[i].data->name, name)
== 0) &&
(rte_cryptodev_globals->devs[i].attached ==
--
2.5.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] cryptodev: fix crash on null dereference
2016-12-03 18:34 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
@ 2016-12-09 12:06 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2016-12-09 12:06 UTC (permalink / raw)
To: Jerin Jacob, dev; +Cc: Doherty, Declan, stable
> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Saturday, December 03, 2016 6:34 PM
> To: dev@dpdk.org
> Cc: Doherty, Declan; De Lara Guarch, Pablo; Jerin Jacob; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] cryptodev: fix crash on null dereference
>
> crypodev->data->name will be null when
> rte_cryptodev_get_dev_id() invoked without a valid
> crypto device instance.
>
> Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto
> devices")
>
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Acked-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> CC: stable@dpdk.org
Applied to dpdk-next-crypto.
Thanks,
Pablo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-12-09 12:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 19:11 [dpdk-dev] [PATCH] cryptodev: fix crash on null dereference Jerin Jacob
2016-11-16 12:11 ` Kusztal, ArkadiuszX
2016-11-30 15:10 ` De Lara Guarch, Pablo
2016-11-30 20:36 ` Jerin Jacob
2016-12-03 18:34 ` [dpdk-dev] [PATCH v2] " Jerin Jacob
2016-12-09 12:06 ` De Lara Guarch, Pablo
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).