patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/2] crypto/dpaa2_sec: fix to check queue pair array for null
@ 2020-09-03 17:17 Hemant Agrawal
  2020-10-09 19:09 ` Akhil Goyal
  0 siblings, 1 reply; 2+ messages in thread
From: Hemant Agrawal @ 2020-09-03 17:17 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, stable, Hemant Agrawal

dpdk-procinfo calls the crypto stats API, which results segmentation
fault on DPAA2_SEC.
The queue pair array will be NULL, when it is used without
configuring the SEC device.

Fixes: 02f35eee264b ("crypto/dpaa2_sec: support statistics")
Cc: stable@dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 109e61ae1..f480aafd0 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3501,7 +3501,7 @@ void dpaa2_sec_stats_get(struct rte_cryptodev *dev,
 		return;
 	}
 	for (i = 0; i < dev->data->nb_queue_pairs; i++) {
-		if (qp[i] == NULL) {
+		if (qp == NULL || qp[i] == NULL) {
 			DPAA2_SEC_DEBUG("Uninitialised queue pair");
 			continue;
 		}
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH 1/2] crypto/dpaa2_sec: fix to check queue pair array for null
  2020-09-03 17:17 [dpdk-stable] [PATCH 1/2] crypto/dpaa2_sec: fix to check queue pair array for null Hemant Agrawal
@ 2020-10-09 19:09 ` Akhil Goyal
  0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2020-10-09 19:09 UTC (permalink / raw)
  To: Hemant Agrawal, dev; +Cc: stable, Hemant Agrawal

> dpdk-procinfo calls the crypto stats API, which results segmentation
> fault on DPAA2_SEC.
> The queue pair array will be NULL, when it is used without
> configuring the SEC device.
> 
> Fixes: 02f35eee264b ("crypto/dpaa2_sec: support statistics")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Series
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto

Thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-09 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 17:17 [dpdk-stable] [PATCH 1/2] crypto/dpaa2_sec: fix to check queue pair array for null Hemant Agrawal
2020-10-09 19:09 ` Akhil Goyal

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).