From patchwork Wed Nov 6 05:17:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 178592 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp126258ilf; Tue, 5 Nov 2019 21:20:47 -0800 (PST) X-Google-Smtp-Source: APXvYqyeMvw71Mmg0CPJwZejQLxAbCUwYBOUtXIvpiwzolQ3G3GQr6Od96yYDtAQEGd0jroEuuZh X-Received: by 2002:a50:d717:: with SMTP id t23mr610398edi.231.1573017647641; Tue, 05 Nov 2019 21:20:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573017647; cv=none; d=google.com; s=arc-20160816; b=I90gbYZRHYrwUYfg9k/WP5xix6omB/M3A9GDujcII6DqXDArVREBGZ8d4w8oPwvt2K +rukoh13Npl9wXfl6CsM0OGepLbwFJoA8NLgYXQu/O320amhCfktPEGs6tRfYjyxiu0K DinD7CY9ndTvIbVoaG+Y7pr53K3zcnhhiSyW/OXZ/+WN7ErTTRrz+7VnkqpW7pcrmE3B ZWeszSMLDVmsmc9FUHpqid3CKaVdOZV/i8NUSwbv2CGPtyKsDjZGmBOmUYjvldKb9wYm j3d2LQIEUJVcoWvz7QbWMsxyAW+9z5HHEV3njM4SAR4YvYVDN4pf+vQFC60xNVmrI7WB WTww== 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=QwgE/gRJ0xur43h0bBivUraQW4GKI55XHaxsO1netN0=; b=CuBDFxnQNMcdF/nj5MbLm1+xABL1TTAQfVZpQsl7rh0NPRQRURwD/6/4KrVk5t94/q 0ycCNNMeBScgkQCdiXnfaCNuC8AY8KzaOL/ftp0QnRJBSVHijkJcOcNKBGnxHNEQICqu LFA2rXsHbeL+UmuHN/Ka6CsLg9AvVy/WtbDUcbWgBk4VDsfhmE1d09CZl/f6b9KZK7gJ qF5S8bQrLCk8b0bB1aH2UWb39anLedGsYsCYXMW9KRlm+nbnwn59x/p4gPekW3h2du4C 6yF51vntjXPH4/dGqbTfeaX6lUpuRXxTMu97qnIZjq6/vJOxwvqkBsu812XmIVb9/5Ey 3lFg== 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 e20si5839868eja.244.2019.11.05.21.20.47; Tue, 05 Nov 2019 21:20:47 -0800 (PST) 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 0BC901BF81; Wed, 6 Nov 2019 06:20:43 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 658B7A69 for ; Wed, 6 Nov 2019 06:20:39 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 04DCE1A0795; Wed, 6 Nov 2019 06:20:39 +0100 (CET) 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 948621A05F9; Wed, 6 Nov 2019 06:20:37 +0100 (CET) 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 5B93C402DF; Wed, 6 Nov 2019 13:20:35 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: akhil.goyal@nxp.com Date: Wed, 6 Nov 2019 10:47:20 +0530 Message-Id: <20191106051731.3625-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191106051731.3625-1-hemant.agrawal@nxp.com> References: <20191101175141.4663-1-hemant.agrawal@nxp.com> <20191106051731.3625-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 02/13] 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 b04890a48..7d51112c5 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1365,6 +1365,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) &&