From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 855DDA04C2 for ; Thu, 3 Sep 2020 19:24:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6058A1C0C2; Thu, 3 Sep 2020 19:24:01 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 29386E07; Thu, 3 Sep 2020 19:23:59 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E0C5D200215; Thu, 3 Sep 2020 19:23:58 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D347E2002AD; Thu, 3 Sep 2020 19:23:56 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id D97E7402DD; Thu, 3 Sep 2020 19:23:53 +0200 (CEST) From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com, stable@dpdk.org, Hemant Agrawal Date: Thu, 3 Sep 2020 22:47:44 +0530 Message-Id: <20200903171745.13985-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-stable] [PATCH 1/2] crypto/dpaa2_sec: fix to check queue pair array for null X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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