From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 5F4A5A0096 for ; Mon, 8 Apr 2019 14:26:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96B592BCE; Mon, 8 Apr 2019 14:26:20 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7688A2B95 for ; Mon, 8 Apr 2019 14:26:19 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Apr 2019 05:26:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,325,1549958400"; d="scan'208";a="140916250" Received: from sivswdev08.ir.intel.com (HELO localhost.localdomain) ([10.237.217.47]) by orsmga003.jf.intel.com with ESMTP; 08 Apr 2019 05:26:16 -0700 From: Bernard Iremonger To: dev@dpdk.org, fiona.trahe@intel.com, konstantin.ananyev@intel.com, akhil.goyal@nxp.com Cc: Bernard Iremonger Date: Mon, 8 Apr 2019 13:26:10 +0100 Message-Id: <1554726370-16591-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] crypto/qat: fix second seg fault in QAT PMD 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190408122610.x-h4CeDq42psqsGFXNP07MZZhv5cg4uqi7QUa8HNl8E@z> While running the IPsec unit tests the following segmentation fault is occurring: Thread 1 "test" received signal SIGSEGV, Segmentation fault. 0x0000000000bf3b50 in qat_sym_process_response ( op=0x5355280 , resp=0x100455100 "") at /root/dpdk/drivers/crypto/qat/qat_sym.h:161 161 if (sess->bpi_ctx) Fixes: 91614c73b67c ("crypto/qat: make response process function inline") Signed-off-by: Bernard Iremonger --- drivers/crypto/qat/qat_sym.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h index bc6426c..685c6c0 100644 --- a/drivers/crypto/qat/qat_sym.h +++ b/drivers/crypto/qat/qat_sym.h @@ -157,10 +157,12 @@ qat_sym_process_response(void **op, uint8_t *resp) rx_op->sym->session, cryptodev_qat_driver_id); - - if (sess->bpi_ctx) + if (sess == NULL) + rx_op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED; + else if (sess->bpi_ctx) { qat_bpicipher_postprocess(sess, rx_op); - rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; + rx_op->status = RTE_CRYPTO_OP_STATUS_SUCCESS; + } } *op = (void *)rx_op; } -- 2.7.4