From patchwork Fri Oct 25 08:33:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 177704 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp3286856ocf; Fri, 25 Oct 2019 01:36:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWFrvkjAm55FqXAgS+5Q0rilB94YYUCXQDz7bYfejlX7NNtXM5AmQCd/Znma7dZo5tZqQT X-Received: by 2002:a17:906:8682:: with SMTP id g2mr2223889ejx.225.1571992600790; Fri, 25 Oct 2019 01:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571992600; cv=none; d=google.com; s=arc-20160816; b=Ep0PbT1KVV8oCrc1Ajcf4fyv8adeygbVMkLUOYqJFEjK2/CB+IcuhDT8l9VjV0ZIkN 5aRAeVMS81kRLf/Kk1WaQbCHMur4et/coixUWBaQ7C+uP13B0cnxXqqvm9g1kKEcFaX6 OHRDDPn3pb3v9pevTDclx0feJsyn4CZ0FUiYpP2JVWJPeYM7zzeTAUrbktY1bAVRNigD Fja45aBUsXKrbcMhbq7un98l49g99uAiXWi5F478K9xI0qYguNBRNonDNXcdvJQMmI9y JxgefTdgwODKjcdDWgmjjfxvLk5/Yg6sH1t2d3VV6rR2Y4/Gs0itfL2Isfp83Y7rBjpK oG6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=tDxZhCUUj98WaGQQ/XfNlp0B4RSMYjjztb2aXlLtAe4=; b=HFjmjvu1NeQl8GRPrMyP//ULbtfiUz0Fz4BvPhzT+wVqre0T6lFGDFJWCcmJ2of/WX aI6++n4jRemDZpPd39nscPbPo+qWJ8MTCikuXhKEstKvZ6si3W7veubpq6DLmIsq7p3I izmn/9PZDPNRVAfdiGhIbAgdSaUBtVBLnXNGpnW2yT0VCEu9mQv+E1xDZCW8YiSZ86fG rD4HFrN9mwu1/HNTXC/VvfxBS8XiLc7dN1cPIXeTvp3NMzMHFV8KOd7QJ402pMqaTlCX qYejuO4L8n8I9E0zehgOkfgXPcu+tgmrp2pgk59kOjWkPuBmynJ8keblZqYDFxfpqcAY OO8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id uz3si331113ejb.344.2019.10.25.01.36.40; Fri, 25 Oct 2019 01:36:40 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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(+) -- 2.17.1 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) &&