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 988E7A32A2 for ; Fri, 25 Oct 2019 10:36:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 09A7C1C0C8; Fri, 25 Oct 2019 10:36:37 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 049981BEE3 for ; Fri, 25 Oct 2019 10:36:32 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A57A71A0A41; Fri, 25 Oct 2019 10:36:31 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D7EFF1A08A8; Fri, 25 Oct 2019 10:36:29 +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 73025402DA; Fri, 25 Oct 2019 16:36:27 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, akhil.goyal@nxp.com Cc: Hemant Agrawal Date: Fri, 25 Oct 2019 14:03:30 +0530 Message-Id: <20191025083336.24212-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191025083336.24212-1-hemant.agrawal@nxp.com> References: <20191025083336.24212-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 2/8] crypto/dpaa2_sec: add check for the session validity X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Check if the session is not null during processing. Signed-off-by: Hemant Agrawal --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 52e522e4a..87220044a 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1368,6 +1368,9 @@ build_sec_fd(struct rte_crypto_op *op, else return -1; + if (!sess) + return -1; + /* Any of the buffer is segmented*/ if (!rte_pktmbuf_is_contiguous(op->sym->m_src) || ((op->sym->m_dst != NULL) && -- 2.17.1